[gtk+] wayland: Set a more believable crossing detail on pointer enter/leave
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Set a more believable crossing detail on pointer enter/leave
- Date: Tue, 13 Oct 2015 00:12:36 +0000 (UTC)
commit 7ab250c10cc84de5474066c6be6706f6f87f1b53
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Oct 9 16:14:31 2015 +0200
wayland: Set a more believable crossing detail on pointer enter/leave
GDK_NOTIFY_ANCESTOR would happen when the pointer crosses across a direct
parent/child. However nonlinear events are more likely, specially when
the pointer moves across toplevels (either different apps, or menus being
popped up over the pointer position).
This makes popping up comboboxes and other menus that fall over the pointer
position possible. With the previous detail the GtkMenu code misinterpreted
the crossing event, making it think the button release coming right after
should dismiss the popup, which made menus just flash on the screen unless
you kept the button pressed.
gdk/wayland/gdkdevice-wayland.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index b6e3fd0..84a1167 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -881,7 +881,7 @@ pointer_handle_enter (void *data,
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
- event->crossing.detail = GDK_NOTIFY_ANCESTOR;
+ event->crossing.detail = GDK_NOTIFY_NONLINEAR;
event->crossing.focus = TRUE;
event->crossing.state = 0;
@@ -928,7 +928,7 @@ pointer_handle_leave (void *data,
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
- event->crossing.detail = GDK_NOTIFY_ANCESTOR;
+ event->crossing.detail = GDK_NOTIFY_NONLINEAR;
event->crossing.focus = TRUE;
event->crossing.state = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]