[mutter/gnome-3-26] wayland: Ensure wl_shell_surfaces are set reactive



commit 294cceaeb8ecfd468132eff8af1f75c9d60ff21d
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Fri Jan 5 17:47:41 2018 +0800

    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 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-wl-shell.c b/src/wayland/meta-wayland-wl-shell.c
index 1888c78..3b69f39 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]