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: