diff options
author | Alexander Larsson <alexl@redhat.com> | 2011-04-05 10:03:14 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2011-04-07 10:03:16 +0200 |
commit | e113cf26fba455f87ac5c2ab60fa2e39b3e4ddc9 (patch) | |
tree | 4bbba7fc0d815153b022bc30bc5919cb4ee12232 /gdk/broadway/gdkeventsource.c | |
parent | ee1657d88ec911582d137205d0457f890a3943d0 (diff) | |
download | gtk+-e113cf26fba455f87ac5c2ab60fa2e39b3e4ddc9.tar.gz |
[broadway] Keep track of current real cursor window (sans grabs)
We need this to be able to do a non-roundtripping get-window.
Diffstat (limited to 'gdk/broadway/gdkeventsource.c')
-rw-r--r-- | gdk/broadway/gdkeventsource.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c index d4790aeb81..c94eb090d2 100644 --- a/gdk/broadway/gdkeventsource.c +++ b/gdk/broadway/gdkeventsource.c @@ -106,8 +106,10 @@ _gdk_broadway_events_got_input (GdkDisplay *display, case 'e': /* Enter */ display_broadway->last_x = message->pointer.root_x; display_broadway->last_y = message->pointer.root_y; + display_broadway->real_mouse_in_toplevel = + g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.mouse_window_id)); - window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.id)); + window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.event_window_id)); /* TODO: Unset when it dies */ display_broadway->mouse_in_toplevel = window; @@ -140,8 +142,10 @@ _gdk_broadway_events_got_input (GdkDisplay *display, case 'l': /* Leave */ display_broadway->last_x = message->pointer.root_x; display_broadway->last_y = message->pointer.root_y; + display_broadway->real_mouse_in_toplevel = + g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.mouse_window_id)); - window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.id)); + window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.event_window_id)); display_broadway->mouse_in_toplevel = NULL; if (window) @@ -173,8 +177,10 @@ _gdk_broadway_events_got_input (GdkDisplay *display, case 'm': /* Mouse move */ display_broadway->last_x = message->pointer.root_x; display_broadway->last_y = message->pointer.root_y; + display_broadway->real_mouse_in_toplevel = + g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.mouse_window_id)); - window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.id)); + window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.event_window_id)); if (window) { event = gdk_event_new (GDK_MOTION_NOTIFY); @@ -196,8 +202,10 @@ _gdk_broadway_events_got_input (GdkDisplay *display, case 'B': display_broadway->last_x = message->pointer.root_x; display_broadway->last_y = message->pointer.root_y; + display_broadway->real_mouse_in_toplevel = + g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.mouse_window_id)); - window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.id)); + window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.event_window_id)); if (window) { event = gdk_event_new (message->base.type == 'b' ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE); @@ -219,8 +227,10 @@ _gdk_broadway_events_got_input (GdkDisplay *display, case 's': display_broadway->last_x = message->pointer.root_x; display_broadway->last_y = message->pointer.root_y; + display_broadway->real_mouse_in_toplevel = + g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.mouse_window_id)); - window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.id)); + window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->pointer.event_window_id)); if (window) { event = gdk_event_new (GDK_SCROLL); |