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=cd5a2f0da39d525cb69bf5fe64a03c9c588a5ef5;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: