confine the mouse to the window for button grabs so that alt-click-drag on a window that wont move doesnt let the mouse leave the window and cause havoc

This commit is contained in:
Dana Jansens 2002-05-14 23:15:38 +00:00
parent f7ace0fad8
commit e7978c7d24

View file

@ -261,16 +261,16 @@ OpenboxWindow::OpenboxWindow(Openbox &o, Window w, BScreen *s) : openbox(o) {
if (! screen->sloppyFocus()) if (! screen->sloppyFocus())
openbox.grabButton(Button1, 0, frame.plate, True, ButtonPressMask, openbox.grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
GrabModeSync, GrabModeSync, None, None); GrabModeSync, GrabModeSync, frame.plate, None);
openbox.grabButton(Button1, Mod1Mask, frame.window, True, openbox.grabButton(Button1, Mod1Mask, frame.window, True,
ButtonReleaseMask | ButtonMotionMask, GrabModeAsync, ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
GrabModeAsync, None, openbox.getMoveCursor()); GrabModeAsync, frame.window, openbox.getMoveCursor());
openbox.grabButton(Button2, Mod1Mask, frame.window, True, openbox.grabButton(Button2, Mod1Mask, frame.window, True,
ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None); ButtonReleaseMask, GrabModeAsync, GrabModeAsync, frame.window, None);
openbox.grabButton(Button3, Mod1Mask, frame.window, True, openbox.grabButton(Button3, Mod1Mask, frame.window, True,
ButtonReleaseMask | ButtonMotionMask, GrabModeAsync, ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
GrabModeAsync, None, None); GrabModeAsync, frame.window, None);
positionWindows(); positionWindows();
XRaiseWindow(display, frame.plate); XRaiseWindow(display, frame.plate);