mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
Fix unwanted mouse grab op on rapid click-and-release
This commit is contained in:
parent
c60ec1802a
commit
4b9a23e8eb
@ -1,3 +1,11 @@
|
||||
2004-04-15 Elijah Newren <newren@math.utah.edu>
|
||||
|
||||
* src/display.c: Prevent unwanted grab op from occurring.
|
||||
Previously, for some people under certain conditions, clicking and
|
||||
releasing the mouse button rapidly enough would result in Metacity
|
||||
starting a move operation due to ignoring the button release.
|
||||
This should fix that problem (it does for me). See bug 136587.
|
||||
|
||||
2004-04-11 Rob Adams <readams@readams.net>
|
||||
|
||||
* configure.in: Make the --enable-xinerama switch work properly.
|
||||
|
@ -1270,7 +1270,7 @@ event_callback (XEvent *event,
|
||||
|
||||
if (display->grab_op != META_GRAB_OP_NONE &&
|
||||
display->grab_window != NULL &&
|
||||
event->xany.serial > display->grab_start_serial &&
|
||||
event->xany.serial >= display->grab_start_serial &&
|
||||
grab_op_is_mouse (display->grab_op))
|
||||
meta_window_handle_mouse_grab_op_event (display->grab_window, event);
|
||||
}
|
||||
@ -1337,7 +1337,7 @@ event_callback (XEvent *event,
|
||||
if ((window &&
|
||||
grab_op_is_mouse (display->grab_op) &&
|
||||
display->grab_button != (int) event->xbutton.button &&
|
||||
event->xany.serial > display->grab_start_serial &&
|
||||
event->xany.serial >= display->grab_start_serial &&
|
||||
display->grab_window == window) ||
|
||||
grab_op_is_keyboard (display->grab_op))
|
||||
{
|
||||
@ -1498,19 +1498,19 @@ event_callback (XEvent *event,
|
||||
break;
|
||||
case ButtonRelease:
|
||||
if (display->grab_window == window &&
|
||||
event->xany.serial > display->grab_start_serial &&
|
||||
event->xany.serial >= display->grab_start_serial &&
|
||||
grab_op_is_mouse (display->grab_op))
|
||||
meta_window_handle_mouse_grab_op_event (window, event);
|
||||
break;
|
||||
case MotionNotify:
|
||||
if (display->grab_window == window &&
|
||||
event->xany.serial > display->grab_start_serial &&
|
||||
event->xany.serial >= display->grab_start_serial &&
|
||||
grab_op_is_mouse (display->grab_op))
|
||||
meta_window_handle_mouse_grab_op_event (window, event);
|
||||
break;
|
||||
case EnterNotify:
|
||||
if (display->grab_window == window &&
|
||||
event->xany.serial > display->grab_start_serial &&
|
||||
event->xany.serial >= display->grab_start_serial &&
|
||||
grab_op_is_mouse (display->grab_op))
|
||||
meta_window_handle_mouse_grab_op_event (window, event);
|
||||
/* do this even if window->has_focus to avoid races */
|
||||
@ -1574,7 +1574,7 @@ event_callback (XEvent *event,
|
||||
break;
|
||||
case LeaveNotify:
|
||||
if (display->grab_window == window &&
|
||||
event->xany.serial > display->grab_start_serial &&
|
||||
event->xany.serial >= display->grab_start_serial &&
|
||||
grab_op_is_mouse (display->grab_op))
|
||||
meta_window_handle_mouse_grab_op_event (window, event);
|
||||
else if (window != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user