From 294cceaeb8ecfd468132eff8af1f75c9d60ff21d Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Fri, 5 Jan 2018 17:47:41 +0800 Subject: [PATCH] wayland: Ensure wl_shell_surfaces are set reactive Wayland clients using the wl_shell interface were never receiving mouse input. It meant they also couldn't be raised with a click. This was because the call to meta_wayland_surface_set_window for wl_shell surfaces did nothing while surface->window == window already. As such, it never called clutter_actor_set_reactive() and the wl_shell window remained a non-reactive actor. Just make sure surface->window isn't already set before calling meta_wayland_surface_set_window so it can actually do what it's meant to. https://bugzilla.gnome.org/show_bug.cgi?id=790309 --- src/wayland/meta-wayland-wl-shell.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-wl-shell.c b/src/wayland/meta-wayland-wl-shell.c index 1888c781c..3b69f39b0 100644 --- a/src/wayland/meta-wayland-wl-shell.c +++ b/src/wayland/meta-wayland-wl-shell.c @@ -474,10 +474,11 @@ create_wl_shell_surface_window (MetaWaylandSurface *surface) MetaWaylandWlShellSurface *wl_shell_surface = META_WAYLAND_WL_SHELL_SURFACE (surface->role); MetaWaylandSurface *parent; + MetaWindow *window; GList *l; - surface->window = meta_window_wayland_new (meta_get_display (), surface); - meta_wayland_surface_set_window (surface, surface->window); + window = meta_window_wayland_new (meta_get_display (), surface); + meta_wayland_surface_set_window (surface, window); if (wl_shell_surface->title) meta_window_set_title (surface->window, wl_shell_surface->title);