bug #1 from click placement fixed. was catching more motionNotify events than i wanted to with the new/modified move grabs. now i drop any left-over extras when the move completes so they dont come in too late
This commit is contained in:
parent
b88c4292e5
commit
5705ea3613
2 changed files with 12 additions and 4 deletions
|
@ -2208,6 +2208,7 @@ void OpenboxWindow::redrawCloseButton(Bool pressed) {
|
||||||
|
|
||||||
|
|
||||||
void OpenboxWindow::mapRequestEvent(XMapRequestEvent *re) {
|
void OpenboxWindow::mapRequestEvent(XMapRequestEvent *re) {
|
||||||
|
cout << "MAP REQUEST " << client.window << " " << client.title << endl;
|
||||||
if (re->window == client.window) {
|
if (re->window == client.window) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, i18n->getMessage(WindowSet, WindowMapRequest,
|
fprintf(stderr, i18n->getMessage(WindowSet, WindowMapRequest,
|
||||||
|
@ -2785,6 +2786,7 @@ void OpenboxWindow::startMove(int x, int y) {
|
||||||
}
|
}
|
||||||
frame.grab_x = x - frame.x - frame.border_w;
|
frame.grab_x = x - frame.x - frame.border_w;
|
||||||
frame.grab_y = y - frame.y - frame.border_w;
|
frame.grab_y = y - frame.y - frame.border_w;
|
||||||
|
cout << "START MOVE " << client.window << " " << client.title << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2874,6 +2876,11 @@ void OpenboxWindow::endMove() {
|
||||||
}
|
}
|
||||||
screen->hideGeometry();
|
screen->hideGeometry();
|
||||||
XUngrabPointer(display, CurrentTime);
|
XUngrabPointer(display, CurrentTime);
|
||||||
|
// if there are any left over motions from the move, drop them now cuz they
|
||||||
|
// cause problems
|
||||||
|
XEvent e;
|
||||||
|
while (XCheckTypedWindowEvent(display, frame.window, MotionNotify, &e));
|
||||||
|
cout << "END MOVE " << client.window << " " << client.title << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2887,11 +2894,12 @@ void OpenboxWindow::motionNotifyEvent(XMotionEvent *me) {
|
||||||
else if (functions.resize &&
|
else if (functions.resize &&
|
||||||
(((me->state & Button1Mask) && (me->window == frame.right_grip ||
|
(((me->state & Button1Mask) && (me->window == frame.right_grip ||
|
||||||
me->window == frame.left_grip)) ||
|
me->window == frame.left_grip)) ||
|
||||||
(me->state & (Mod1Mask | Button3Mask) &&
|
(me->state == (Mod1Mask | Button3Mask) &&
|
||||||
me->window == frame.window))) {
|
me->window == frame.window))) {
|
||||||
Bool left = resize_zone & ZoneLeft;
|
Bool left = resize_zone & ZoneLeft;
|
||||||
|
|
||||||
if (! flags.resizing) {
|
if (! flags.resizing) {
|
||||||
|
cout << "START RESIZE " << client.window << " " << client.title << endl;
|
||||||
Cursor cursor;
|
Cursor cursor;
|
||||||
if (resize_zone & ZoneTop)
|
if (resize_zone & ZoneTop)
|
||||||
cursor = (resize_zone & ZoneLeft) ?
|
cursor = (resize_zone & ZoneLeft) ?
|
||||||
|
@ -2965,7 +2973,8 @@ void OpenboxWindow::motionNotifyEvent(XMotionEvent *me) {
|
||||||
|
|
||||||
screen->showGeometry(gx, gy);
|
screen->showGeometry(gx, gy);
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
cout << "MOTION " << client.window << " " << client.title << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -283,11 +283,10 @@ Openbox::~Openbox() {
|
||||||
|
|
||||||
|
|
||||||
void Openbox::process_event(XEvent *e) {
|
void Openbox::process_event(XEvent *e) {
|
||||||
if ((masked == e->xany.window) && masked_window &&
|
if ((masked == e->xany.window && masked_window) &&
|
||||||
(e->type == MotionNotify)) {
|
(e->type == MotionNotify)) {
|
||||||
last_time = e->xmotion.time;
|
last_time = e->xmotion.time;
|
||||||
masked_window->motionNotifyEvent(&e->xmotion);
|
masked_window->motionNotifyEvent(&e->xmotion);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue