[MPlayer-cvslog] r36384 - in trunk/gui: ui/video.c wm/ws.c wm/ws.h

ib subversion at mplayerhq.hu
Thu Aug 1 19:20:16 CEST 2013


Author: ib
Date: Thu Aug  1 19:20:16 2013
New Revision: 36384

Log:
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.

Modified:
   trunk/gui/ui/video.c
   trunk/gui/wm/ws.c
   trunk/gui/wm/ws.h

Modified: trunk/gui/ui/video.c
==============================================================================
--- trunk/gui/ui/video.c	Thu Aug  1 19:12:26 2013	(r36383)
+++ trunk/gui/ui/video.c	Thu Aug  1 19:20:16 2013	(r36384)
@@ -112,7 +112,7 @@ static void uiVideoMouse( int Button,int
 
 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)

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Thu Aug  1 19:12:26 2013	(r36383)
+++ trunk/gui/wm/ws.c	Thu Aug  1 19:20:16 2013	(r36384)
@@ -745,25 +745,6 @@ static void wsWindowDecoration(wsWindow 
                     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 @@ void wsWindowCreate(wsWindow *win, int x
     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 @@ void wsWindowVisibility(wsWindow *win, i
     case wsShowWindow:
 
         XMapRaised(wsDisplay, win->WindowID);
-        wsWindowMapWait(win);
 
         if (vo_fs_type & vo_wm_FULLSCREEN)
             win->isFullScreen = False;

Modified: trunk/gui/wm/ws.h
==============================================================================
--- trunk/gui/wm/ws.h	Thu Aug  1 19:12:26 2013	(r36383)
+++ trunk/gui/wm/ws.h	Thu Aug  1 19:20:16 2013	(r36384)
@@ -62,7 +62,6 @@
 #define  wsShowWindow   8
 #define  wsHideWindow   16
 #define  wsOverredirect 32
-#define  wsWaitMap      64
 #define  wsAspect       128
 
 #define wsNone                   0


More information about the MPlayer-cvslog mailing list