# HG changeset patch # User ib # Date 1357845260 0 # Node ID 58d55c9337579f677ca593ae678b512d6e4359de # Parent 840e473ba4c0a4e956bca255b883b29a9da6ebfa Remove Display parameter from wsEvents(). It is common practice with the ws functions to use the global wsDisplay. diff -r 840e473ba4c0 -r 58d55c933757 gui/interface.c --- 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; diff -r 840e473ba4c0 -r 58d55c933757 gui/wm/ws.c --- 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; } diff -r 840e473ba4c0 -r 58d55c933757 gui/wm/ws.h --- 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); // ----------------------------------------------------------------------------------------------