- assert(action >= 0 && action < NUM_MOUSE_ACTION);
-
- MouseContext context;
- switch (type) {
- case OBWidget::Type_Frame:
- context = MC_Frame; break;
- case OBWidget::Type_Titlebar:
- context = MC_Titlebar; break;
- case OBWidget::Type_Handle:
- context = MC_Frame; break;
- case OBWidget::Type_Plate:
- context = MC_Window; break;
- case OBWidget::Type_Label:
- context = MC_Titlebar; break;
- case OBWidget::Type_MaximizeButton:
- context = MC_MaximizeButton; break;
- case OBWidget::Type_CloseButton:
- context = MC_CloseButton; break;
- case OBWidget::Type_IconifyButton:
- context = MC_IconifyButton; break;
- case OBWidget::Type_StickyButton:
- context = MC_StickyButton; break;
- case OBWidget::Type_LeftGrip:
- context = MC_Grip; break;
- case OBWidget::Type_RightGrip:
- context = MC_Grip; break;
- case OBWidget::Type_Client:
- context = MC_Window; break;
- case OBWidget::Type_Root:
- context = MC_Root; break;
- default:
- assert(false); // unhandled type
+ printf("but.mods %d.%d\n", data->button, data->state);
+
+ if (data->context == MC_Window) {
+ // these are grabbed in Sync mode to allow the press to be normal to the
+ // client
+ XAllowEvents(otk::OBDisplay::display, ReplayPointer, data->time);