From cd5a2f0da39d525cb69bf5fe64a03c9c588a5ef5 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sat, 25 May 2013 11:52:26 -0400 Subject: [PATCH] Temporary workaround for moving dockapp or displaying context menu --- src/xevents.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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: -- 2.20.1