1
0
Fork 0

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
This commit is contained in:
Daniel van Vugt 2018-01-05 17:47:41 +08:00 committed by Marco Trevisan (Treviño)
parent 31eafba93a
commit 1c8aebd811

View file

@ -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);