[mutter/wip/rstrode/rhel-8.0.0: 101/117] events: Don't move (sloppy) focus while buttons are pressed
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/rstrode/rhel-8.0.0: 101/117] events: Don't move (sloppy) focus while buttons are pressed
- Date: Sun, 17 Feb 2019 17:31:19 +0000 (UTC)
commit a280a6dbf3b1cd175d819f66c3d2a23d21f71cc6
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Jul 21 15:43:12 2016 +0200
events: Don't move (sloppy) focus while buttons are pressed
(https://bugzilla.redhat.com/show_bug.cgi?id=1358535)
src/x11/events.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/src/x11/events.c b/src/x11/events.c
index f60f650a6..291b7114a 100644
--- a/src/x11/events.c
+++ b/src/x11/events.c
@@ -830,6 +830,16 @@ crossing_serial_is_ignored (MetaDisplay *display,
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
handle_input_xevent (MetaDisplay *display,
XIEvent *input_event,
@@ -871,6 +881,7 @@ handle_input_xevent (MetaDisplay *display,
* avoid races.
*/
if (window && !crossing_serial_is_ignored (display, serial) &&
+ !event_has_button_mask (enter_event) &&
enter_event->mode != XINotifyGrab &&
enter_event->mode != XINotifyUngrab &&
enter_event->detail != XINotifyInferior &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]