[mutter] wayland: Set window type of wl_shell_surface popups to 'dropdown menu'



commit 1088bf476dea7850b9acf0b88556f4f5afbdc40f
Author: Jonas Ådahl <jadahl gmail com>
Date:   Tue Dec 15 22:13:05 2015 +0800

    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 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-wl-shell.c b/src/wayland/meta-wayland-wl-shell.c
index 7a34909..efd3f97 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


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