changeset 35637:58d55c933757

Remove Display parameter from wsEvents(). It is common practice with the ws functions to use the global wsDisplay.
author ib
date Thu, 10 Jan 2013 19:14:20 +0000
parents 840e473ba4c0
children 78d9cfd68b34
files gui/interface.c gui/wm/ws.c gui/wm/ws.h
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Thu Jan 10 15:40:43 2013 +0000
+++ b/gui/interface.c	Thu Jan 10 19:14:20 2013 +0000
@@ -806,7 +806,7 @@
 
     case GUI_HANDLE_X_EVENT:
 
-        wsEvents(wsDisplay, data);
+        wsEvents(data);
         gtkEventHandling();
         break;
 
--- a/gui/wm/ws.c	Thu Jan 10 15:40:43 2013 +0000
+++ b/gui/wm/ws.c	Thu Jan 10 19:14:20 2013 +0000
@@ -674,7 +674,7 @@
 //   Handle events.
 // ----------------------------------------------------------------------------------------------
 
-Bool wsEvents(Display *display, XEvent *event)
+Bool wsEvents(XEvent *event)
 {
     unsigned long i = 0;
     int l;
@@ -872,7 +872,7 @@
             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 @@
     while (XPending(wsDisplay)) {
         XNextEvent(wsDisplay, &wsEvent);
 //   printf("### X event: %d  [%d]\n",wsEvent.type,delay);
-        wsEvents(wsDisplay, &wsEvent);
+        wsEvents(&wsEvent);
     }
 }
 
@@ -964,7 +964,7 @@
         /* handle pending events */
         while (XPending(wsDisplay)) {
             XNextEvent(wsDisplay, &wsEvent);
-            wsEvents(wsDisplay, &wsEvent);
+            wsEvents(&wsEvent);
             delay = 0;
         }
 
--- a/gui/wm/ws.h	Thu Jan 10 15:40:43 2013 +0000
+++ b/gui/wm/ws.h	Thu Jan 10 19:14:20 2013 +0000
@@ -221,7 +221,7 @@
 void wsDoExit(void);
 void wsMainLoop(void);
 void wsAutohideCursor(void);
-Bool wsEvents(Display *display, XEvent *event);
+Bool wsEvents(XEvent *event);
 void wsHandleEvents(void);
 
 // ----------------------------------------------------------------------------------------------