[MPlayer-cvslog] r35731 - in trunk/gui: interface.c wm/ws.c wm/ws.h

ib subversion at mplayerhq.hu
Thu Jan 10 20:14:20 CET 2013


Author: ib
Date: Thu Jan 10 20:14:20 2013
New Revision: 35731

Log:
Remove Display parameter from wsEvents().

It is common practice with the ws functions to use the global wsDisplay.

Modified:
   trunk/gui/interface.c
   trunk/gui/wm/ws.c
   trunk/gui/wm/ws.h

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Thu Jan 10 16:40:43 2013	(r35730)
+++ trunk/gui/interface.c	Thu Jan 10 20:14:20 2013	(r35731)
@@ -806,7 +806,7 @@ int gui(int what, void *data)
 
     case GUI_HANDLE_X_EVENT:
 
-        wsEvents(wsDisplay, data);
+        wsEvents(data);
         gtkEventHandling();
         break;
 

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Thu Jan 10 16:40:43 2013	(r35730)
+++ trunk/gui/wm/ws.c	Thu Jan 10 20:14:20 2013	(r35731)
@@ -674,7 +674,7 @@ void wsAutohideCursor(void)
 //   Handle events.
 // ----------------------------------------------------------------------------------------------
 
-Bool wsEvents(Display *display, XEvent *event)
+Bool wsEvents(XEvent *event)
 {
     unsigned long i = 0;
     int l;
@@ -872,7 +872,7 @@ keypressed:
             static XEvent e;
 
             if (event->xmotion.state) {
-                while (XCheckTypedWindowEvent(display, event->xany.window, MotionNotify, &e)) {
+                while (XCheckTypedWindowEvent(wsDisplay, event->xany.window, MotionNotify, &e)) {
                     /* FIXME: need to make sure we didn't release/press the button in between...*/
                     /* FIXME: do we need some timeout here to make sure we don't spend too much time
                      * removing events from the queue? */
@@ -947,7 +947,7 @@ void wsHandleEvents(void)
     while (XPending(wsDisplay)) {
         XNextEvent(wsDisplay, &wsEvent);
 //   printf("### X event: %d  [%d]\n",wsEvent.type,delay);
-        wsEvents(wsDisplay, &wsEvent);
+        wsEvents(&wsEvent);
     }
 }
 
@@ -964,7 +964,7 @@ void wsMainLoop(void)
         /* handle pending events */
         while (XPending(wsDisplay)) {
             XNextEvent(wsDisplay, &wsEvent);
-            wsEvents(wsDisplay, &wsEvent);
+            wsEvents(&wsEvent);
             delay = 0;
         }
 

Modified: trunk/gui/wm/ws.h
==============================================================================
--- trunk/gui/wm/ws.h	Thu Jan 10 16:40:43 2013	(r35730)
+++ trunk/gui/wm/ws.h	Thu Jan 10 20:14:20 2013	(r35731)
@@ -221,7 +221,7 @@ int wsGetDepthOnScreen(void);
 void wsDoExit(void);
 void wsMainLoop(void);
 void wsAutohideCursor(void);
-Bool wsEvents(Display *display, XEvent *event);
+Bool wsEvents(XEvent *event);
 void wsHandleEvents(void);
 
 // ----------------------------------------------------------------------------------------------


More information about the MPlayer-cvslog mailing list