all repos — openbox @ 7a95b5a949e590745a5a9a878e1386e7bd7d1b72

openbox fork - make it a bit more like ryudo

don't grab for motion/releases on the client window, i don't get them anyways.
Dana Jansens danakj@orodu.net
commit

7a95b5a949e590745a5a9a878e1386e7bd7d1b72

parent

15a7384d11b7a521945a14c8192b0d176adadfe7

1 files changed, 8 insertions(+), 6 deletions(-)

jump to
M src/bindings.ccsrc/bindings.cc

@@ -482,23 +482,26 @@ OBClient *client)

{ Window win; int mode = GrabModeAsync; + unsigned int mask; switch(context) { case MC_Frame: win = client->frame->window(); + mask = ButtonPressMask | ButtonMotionMask | ButtonReleaseMask; break; case MC_Window: win = client->frame->plate(); mode = GrabModeSync; // this is handled in fireButton + mask = ButtonPressMask; // can't catch more than this with Sync mode + // the release event is manufactured by the + // master buttonPressHandler break; default: // any other elements already get button events, don't grab on them return; } if (grab) - otk::OBDisplay::grabButton(b.key, b.modifiers, win, false, - ButtonPressMask | ButtonMotionMask | - ButtonReleaseMask, mode, GrabModeAsync, - None, None, false); + otk::OBDisplay::grabButton(b.key, b.modifiers, win, false, mask, mode, + GrabModeAsync, None, None, false); else otk::OBDisplay::ungrabButton(b.key, b.modifiers, win); }

@@ -515,8 +518,7 @@

void OBBindings::fireButton(MouseData *data) { if (data->context == MC_Window) { - // these are grabbed in Sync mode to allow the press to be normal to the - // client + // Replay the event, so it goes to the client, and ungrab the device. XAllowEvents(otk::OBDisplay::display, ReplayPointer, data->time); }