sync with bb-cvs: re-add support for alt-button2, fix some off by 2's temorarily

This commit is contained in:
Dana Jansens 2002-07-05 23:56:10 +00:00
parent 9d2f88e05a
commit 6716bd3323
2 changed files with 14 additions and 6 deletions

View file

@ -13,9 +13,9 @@ $ #OpaqueMove
$ #FullMax $ #FullMax
# Maximisation complète # Maximisation complète
$ #FocusNew $ #FocusNew
# Clavier à la nouvelle fenêtre # Attribuer le clavier à la nouvelle fenêtre
$ #FocusLast $ #FocusLast
# Clavier à la dernière fenêtre # Attribuer le clavier en changeant d'espace de travail
$ #ClickToFocus $ #ClickToFocus
# Cliquer pour obtenir le clavier # Cliquer pour obtenir le clavier
$ #SloppyFocus $ #SloppyFocus

View file

@ -847,6 +847,10 @@ void BlackboxWindow::grabButtons(void) {
ButtonReleaseMask | ButtonMotionMask, GrabModeAsync, ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
GrabModeAsync, frame.window, GrabModeAsync, frame.window,
blackbox->getLowerRightAngleCursor()); blackbox->getLowerRightAngleCursor());
// alt+middle lowers the window
blackbox->grabButton(Button2, Mod1Mask, frame.window, True,
ButtonReleaseMask, GrabModeAsync, GrabModeAsync,
frame.window, None);
} }
@ -855,6 +859,7 @@ void BlackboxWindow::ungrabButtons(void) {
blackbox->ungrabButton(Button1, 0, frame.plate); blackbox->ungrabButton(Button1, 0, frame.plate);
blackbox->ungrabButton(Button1, Mod1Mask, frame.window); blackbox->ungrabButton(Button1, Mod1Mask, frame.window);
blackbox->ungrabButton(Button2, Mod1Mask, frame.window);
blackbox->ungrabButton(Button3, Mod1Mask, frame.window); blackbox->ungrabButton(Button3, Mod1Mask, frame.window);
} }
@ -2216,7 +2221,7 @@ void BlackboxWindow::applyGravity(Rect &r) {
case NorthEastGravity: case NorthEastGravity:
case SouthEastGravity: case SouthEastGravity:
case EastGravity: case EastGravity:
r.setX(client.rect.x() - frame.margin.left - frame.margin.right); r.setX(client.rect.x() - frame.margin.left - frame.margin.right + 2);
break; break;
case ForgetGravity: case ForgetGravity:
@ -2243,7 +2248,7 @@ void BlackboxWindow::applyGravity(Rect &r) {
case SouthWestGravity: case SouthWestGravity:
case SouthEastGravity: case SouthEastGravity:
case SouthGravity: case SouthGravity:
r.setY(client.rect.y() - frame.margin.top - frame.margin.bottom); r.setY(client.rect.y() - frame.margin.top - frame.margin.bottom + 2);
break; break;
case ForgetGravity: case ForgetGravity:
@ -2279,7 +2284,7 @@ void BlackboxWindow::restoreGravity(Rect &r) {
case NorthEastGravity: case NorthEastGravity:
case SouthEastGravity: case SouthEastGravity:
case EastGravity: case EastGravity:
r.setX(frame.rect.x() + frame.margin.left + frame.margin.right); r.setX(frame.rect.x() + frame.margin.left + frame.margin.right - 2);
break; break;
case ForgetGravity: case ForgetGravity:
@ -2306,7 +2311,7 @@ void BlackboxWindow::restoreGravity(Rect &r) {
case SouthWestGravity: case SouthWestGravity:
case SouthEastGravity: case SouthEastGravity:
case SouthGravity: case SouthGravity:
r.setY(frame.rect.y() + frame.margin.top + frame.margin.bottom); r.setY(frame.rect.y() + frame.margin.top + frame.margin.bottom - 2);
break; break;
case ForgetGravity: case ForgetGravity:
@ -2821,6 +2826,9 @@ void BlackboxWindow::buttonReleaseEvent(const XButtonEvent *re) {
endMove(); endMove();
} else if (flags.resizing) { } else if (flags.resizing) {
endResize(); endResize();
} else if (re->window == frame.window) {
if (re->button == 2 && re->state == Mod1Mask)
XUngrabPointer(blackbox->getXDisplay(), CurrentTime);
} }
} }