From: Hugo Villeneuve Date: Sat, 25 May 2013 15:52:26 +0000 (-0400) Subject: Temporary workaround for moving dockapp or displaying context menu X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=refs%2Fheads%2Fmouse-workaround;p=dockapps%2Fwmnotify.git Temporary workaround for moving dockapp or displaying context menu --- diff --git a/src/xevents.c b/src/xevents.c index 3eec774..b949819 100644 --- a/src/xevents.c +++ b/src/xevents.c @@ -147,6 +147,25 @@ void ProcessXlibEvents(void) if (Event.xbutton.button == Button1) { /* Mouse LEFT button pressed. */ button1_pressed = true; + } else if (Event.xbutton.button == Button2) { + /* + * Temporary workaround for moving dockapp or + * displaying context menu. + * If the user presses on button2, the dockapp + * window will no longer process xevents. + * WindowMaker will then process them so by + * clicking anywhere on the dockapp it will be + * able to move it. Same thing for + * right-clicking anywhere on the dockapp. + * After that, dockapp needs to be restarted + * for normal mouse behavior. + */ + printf("Return mouse control to WindowMaker\n"); + + (void) XSelectInput(dockapp.display, + dockapp.iconwin, + ExposureMask | + StructureNotifyMask); } break; case ButtonRelease: