comparison gui/interface.c @ 35652:f6c00eacd816

Add wsMapWait(). This waits for a map notify event which is required in order to paint into the window. Remove the waiting loop in interface.c and set a corresponding property for the video window which, now, will regard vo_keepaspect. This also closes Bugzilla #1357.
author ib
date Tue, 15 Jan 2013 11:54:22 +0000
parents a30496350cb9
children 59a6b817a287
comparison
equal deleted inserted replaced
35651:ebaac70ff6dc 35652:f6c00eacd816
170 } 170 }
171 171
172 if (guiWinID >= 0) 172 if (guiWinID >= 0)
173 guiApp.mainWindow.Parent = guiWinID; 173 guiApp.mainWindow.Parent = guiWinID;
174 174
175 wsCreateWindow(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow, "MPlayer - Video"); 175 wsCreateWindow(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow | wsWaitMap, "MPlayer - Video");
176 wsDestroyImage(&guiApp.videoWindow); 176 wsDestroyImage(&guiApp.videoWindow);
177 wsCreateImage(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height); 177 wsCreateImage(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
178 wsXDNDMakeAwareness(&guiApp.videoWindow); 178 wsXDNDMakeAwareness(&guiApp.videoWindow);
179 179
180 WinID = guiApp.videoWindow.WindowID; 180 WinID = guiApp.videoWindow.WindowID;
222 wsVisibleWindow(&guiApp.mainWindow, wsShowWindow); 222 wsVisibleWindow(&guiApp.mainWindow, wsShowWindow);
223 223
224 if (gtkShowVideoWindow) { 224 if (gtkShowVideoWindow) {
225 wsVisibleWindow(&guiApp.videoWindow, wsShowWindow); 225 wsVisibleWindow(&guiApp.videoWindow, wsShowWindow);
226 226
227 {
228 XEvent xev;
229
230 do
231 XNextEvent(wsDisplay, &xev);
232 while (xev.type != MapNotify || xev.xmap.event != guiApp.videoWindow.WindowID);
233
234 guiApp.videoWindow.Mapped = wsMapped; 227 guiApp.videoWindow.Mapped = wsMapped;
235 guiInfo.VideoWindow = True; 228 guiInfo.VideoWindow = True;
236 }
237 229
238 if (gtkLoadFullscreen) 230 if (gtkLoadFullscreen)
239 uiFullScreen(); 231 uiFullScreen();
240 } else 232 } else
241 wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0); 233 wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0);