# HG changeset patch # User ib # Date 1318941924 0 # Node ID 72624e80fbce90aa4ac510ec463e7c8c5f32a3eb # Parent a3c7ac76fac1e557b8e73378970a79aa16a2ec18 Fix bug with option sub_window in the Win32 GUI. Enabling this option didn't work so far. Determine if we need a video window by using the same logic as in the X11/GTK GUI, and hide the subwindow accordingly. This also fixes the probably misunderstood use of GUI_SET_AUDIO in the Win32 GUI. diff -r a3c7ac76fac1 -r 72624e80fbce gui/win32/interface.c --- a/gui/win32/interface.c Tue Oct 18 11:03:39 2011 +0000 +++ b/gui/win32/interface.c Tue Oct 18 12:45:24 2011 +0000 @@ -502,6 +502,7 @@ if(!mygui->playlist->tracks) return 0; uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, STREAMTYPE_FILE); guiInfo.Track = mygui->playlist->current + 1; + guiInfo.VideoWindow = 1; if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); if(gtkAOExtraStereo) { @@ -536,11 +537,8 @@ } case GUI_SET_AUDIO: { - guiInfo.VideoWindow = (data && !guiInfo.sh_video); - // NOTE: This type doesn't mean (and never meant) that we have - // *just* audio, so there probably should be a check before - // hiding (see gui/interface.c). - if(IsWindowVisible(mygui->subwindow)) + if (data && !guiInfo.sh_video) guiInfo.VideoWindow = 0; + if(IsWindowVisible(mygui->subwindow) && !guiInfo.VideoWindow) ShowWindow(mygui->subwindow, SW_HIDE); break; }