changeset 36288:63e8bfb208c6

Remove property wsWaitMap and function wsWindowMapWait(). There was a false check of the property (wsShowWindow instead of wsWaitMap) in wsWindowCreate(), so wsWindowMapWait() was actually never used on window creation. The function seems pointless.
author ib
date Thu, 01 Aug 2013 17:20:16 +0000
parents 3a1b89dc7070
children f3cad93ab011
files gui/ui/video.c gui/wm/ws.c gui/wm/ws.h
diffstat 3 files changed, 1 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/video.c	Thu Aug 01 17:12:26 2013 +0000
+++ b/gui/ui/video.c	Thu Aug 01 17:20:16 2013 +0000
@@ -112,7 +112,7 @@
 
 void uiVideoInit (void)
 {
-  wsWindowCreate(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsShowFrame | wsHideWindow | wsWaitMap | wsAspect, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer - Video");
+  wsWindowCreate(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsShowFrame | wsHideWindow | wsAspect, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer - Video");
   mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[video] videoWindow ID: 0x%x\n", (int) guiApp.videoWindow.WindowID);
   wsWindowIcon(wsDisplay, guiApp.videoWindow.WindowID, &guiIcon);
   if (guiApp.video.Bitmap.Image)
--- a/gui/wm/ws.c	Thu Aug 01 17:12:26 2013 +0000
+++ b/gui/wm/ws.c	Thu Aug 01 17:20:16 2013 +0000
@@ -745,25 +745,6 @@
                     PropModeReplace, (unsigned char *)&wsMotifWmHints, 5);
 }
 
-/**
- * @brief Wait until a window is mapped if its property requires it.
- *
- * @param win pointer to a ws window structure
- */
-static void wsWindowMapWait(wsWindow *win)
-{
-    XEvent xev;
-
-    if (win->Property & wsWaitMap) {
-        do {
-            XNextEvent(wsDisplay, &xev);
-            wsEvent(&xev);
-        } while (xev.type != MapNotify || xev.xmap.event != win->WindowID);
-
-        win->Mapped = wsMapped;
-    }
-}
-
 // ----------------------------------------------------------------------------------------------
 //   Create window.
 //     X,Y   : window position
@@ -915,11 +896,6 @@
     win->Mapped  = wsNo;
     win->Rolled  = wsNo;
 
-    if (p & wsShowWindow) {
-        XMapWindow(wsDisplay, win->WindowID);
-        wsWindowMapWait(win);
-    }
-
     wsImageCreate(win, win->Width, win->Height);
 /* End of creating -------------------------------------------------------------------------- */
 
@@ -1264,7 +1240,6 @@
     case wsShowWindow:
 
         XMapRaised(wsDisplay, win->WindowID);
-        wsWindowMapWait(win);
 
         if (vo_fs_type & vo_wm_FULLSCREEN)
             win->isFullScreen = False;
--- a/gui/wm/ws.h	Thu Aug 01 17:12:26 2013 +0000
+++ b/gui/wm/ws.h	Thu Aug 01 17:20:16 2013 +0000
@@ -62,7 +62,6 @@
 #define  wsShowWindow   8
 #define  wsHideWindow   16
 #define  wsOverredirect 32
-#define  wsWaitMap      64
 #define  wsAspect       128
 
 #define wsNone                   0