[gtk+] wayland: look further through the hierarchy for the surface with the grab
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: look further through the hierarchy for the surface with the grab
- Date: Tue, 19 Feb 2013 01:47:55 +0000 (UTC)
commit ec43a1f72a552184176769f605c37013702b4843
Author: Thomas Wood <thomas wood intel com>
Date: Thu Feb 14 14:44:58 2013 +0000
wayland: look further through the hierarchy for the surface with the grab
https://bugzilla.gnome.org/show_bug.cgi?id=693912
gdk/wayland/gdkwindow-wayland.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 15cef9f..920ead2 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -569,6 +569,7 @@ gdk_wayland_window_map (GdkWindow *window)
if (impl->transient_for)
{
struct wl_seat *grab_input_seat = NULL;
+ GdkWindowImplWayland *tmp_impl;
parent = GDK_WINDOW_IMPL_WAYLAND (impl->transient_for->impl);
@@ -576,11 +577,18 @@ gdk_wayland_window_map (GdkWindow *window)
* the popup window setup - so this relies on GTK+ taking the
* grab before showing the popup window.
*/
- if (impl->grab_input_seat)
- grab_input_seat = impl->grab_input_seat;
+ grab_input_seat = impl->grab_input_seat;
- if (!grab_input_seat)
- grab_input_seat = parent->grab_input_seat;
+ tmp_impl = parent;
+ while (!grab_input_seat)
+ {
+ grab_input_seat = tmp_impl->grab_input_seat;
+
+ if (tmp_impl->transient_for)
+ tmp_impl = GDK_WINDOW_IMPL_WAYLAND (tmp_impl->transient_for->impl);
+ else
+ break;
+ }
if (grab_input_seat &&
(impl->hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]