From 1088bf476dea7850b9acf0b88556f4f5afbdc40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 15 Dec 2015 22:13:05 +0800 Subject: [PATCH] wayland: Set window type of wl_shell_surface popups to 'dropdown menu' The wl_shell_surface popups are mostly used in the same way as xdg_popup, so set the same window type. https://bugzilla.gnome.org/show_bug.cgi?id=757623 https://bugzilla.gnome.org/show_bug.cgi?id=763431 --- src/wayland/meta-wayland-wl-shell.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wayland/meta-wayland-wl-shell.c b/src/wayland/meta-wayland-wl-shell.c index 7a3490913..efd3f9778 100644 --- a/src/wayland/meta-wayland-wl-shell.c +++ b/src/wayland/meta-wayland-wl-shell.c @@ -532,6 +532,13 @@ static void wl_shell_surface_role_managed (MetaWaylandSurfaceRoleShellSurface *shell_surface_role, MetaWindow *window) { + MetaWaylandSurfaceRole *surface_role = + META_WAYLAND_SURFACE_ROLE (shell_surface_role); + MetaWaylandSurface *surface = + meta_wayland_surface_role_get_surface (surface_role); + + if (surface->wl_shell.state == META_WL_SHELL_SURFACE_STATE_POPUP) + meta_window_set_type (window, META_WINDOW_DROPDOWN_MENU); } static void