[gtk/wip/chergert/quartz4u] macos: synthesize motion like we do on 3.x
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/quartz4u] macos: synthesize motion like we do on 3.x
- Date: Fri, 8 May 2020 00:04:08 +0000 (UTC)
commit fbacda54bea5d34c12eaf5538a37357621778447
Author: Christian Hergert <chergert redhat com>
Date: Thu May 7 17:02:53 2020 -0700
macos: synthesize motion like we do on 3.x
gdk/macos/gdkmacossurface.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index 870b9b2510..c805961e17 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -729,6 +729,14 @@ _gdk_macos_surface_set_is_key (GdkMacosSurface *self,
event = gdk_focus_event_new (GDK_SURFACE (self), keyboard, NULL, is_key);
_gdk_event_queue_append (GDK_DISPLAY (display), event);
+
+ /* We just became the active window. Unlike X11, Mac OS X does
+ * not send us motion events while the window does not have focus
+ * ("is not key"). We send a dummy motion notify event now, so that
+ * everything in the window is set to correct state.
+ */
+ if (is_key)
+ _gdk_macos_display_synthesize_motion (display, self);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]