summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2012-07-11 19:18:37 +0100
committerRob Bradford <rob@linux.intel.com>2012-07-12 15:58:38 +0100
commit8bd14785966776aca589b59868a25394a5855a7e (patch)
tree8d233169e239244a3d18e38e62c201a84944f28c /gdk
parent5b81186be3af44950d054bc09e5cca8fdfbf38fc (diff)
downloadgtk+-8bd14785966776aca589b59868a25394a5855a7e.tar.gz
wayland: wl_shell_surface_set_popup requires a valid seat and serial
If we don't have our own grab then get the grab from the parent.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/wayland/gdkwindow-wayland.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index f1530ebe15..f1b79755c2 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -626,6 +626,8 @@ gdk_wayland_window_map (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWindowImplWayland *parent;
+ GdkWaylandDisplay *wayland_display =
+ GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
if (!impl->mapped)
{
@@ -637,12 +639,21 @@ gdk_wayland_window_map (GdkWindow *window)
impl->hint & GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU ||
impl->hint & GDK_WINDOW_TYPE_HINT_COMBO)
{
+ struct wl_seat *grab_input_seat = NULL;
+
/* Use the device that was used for the grab as the device for
* 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;
+
+ if (!grab_input_seat)
+ grab_input_seat = parent->grab_input_seat;
+
wl_shell_surface_set_popup (impl->shell_surface,
- parent->grab_input_seat, parent->grab_time,
+ grab_input_seat,
+ _gdk_wayland_display_get_serial (wayland_display),
parent->surface,
window->x, window->y, 0);
} else {