mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 00:50:42 -05:00
events: Don't move (sloppy) focus while buttons are pressed
(https://bugzilla.redhat.com/show_bug.cgi?id=1358535)
This commit is contained in:
parent
f3765bf412
commit
a280a6dbf3
@ -830,6 +830,16 @@ crossing_serial_is_ignored (MetaDisplay *display,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
event_has_button_mask (XIEnterEvent *enter_event)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < enter_event->buttons.mask_len; i++)
|
||||||
|
if (enter_event->buttons.mask[i] != '\0')
|
||||||
|
return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
handle_input_xevent (MetaDisplay *display,
|
handle_input_xevent (MetaDisplay *display,
|
||||||
XIEvent *input_event,
|
XIEvent *input_event,
|
||||||
@ -871,6 +881,7 @@ handle_input_xevent (MetaDisplay *display,
|
|||||||
* avoid races.
|
* avoid races.
|
||||||
*/
|
*/
|
||||||
if (window && !crossing_serial_is_ignored (display, serial) &&
|
if (window && !crossing_serial_is_ignored (display, serial) &&
|
||||||
|
!event_has_button_mask (enter_event) &&
|
||||||
enter_event->mode != XINotifyGrab &&
|
enter_event->mode != XINotifyGrab &&
|
||||||
enter_event->mode != XINotifyUngrab &&
|
enter_event->mode != XINotifyUngrab &&
|
||||||
enter_event->detail != XINotifyInferior &&
|
enter_event->detail != XINotifyInferior &&
|
||||||
|
Loading…
Reference in New Issue
Block a user