mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
wayland: Keep wl_shell_surface state during loss of window
It has been common practice (in QT5 for example) to set wl_shell_surface state at situations where mutter will have destroyed the MetaWindow. This commit keeps track of the relevant state separately from MetaWindow, and synchronizes when needed. https://bugzilla.gnome.org/show_bug.cgi?id=757623 https://bugzilla.gnome.org/show_bug.cgi?id=763431
This commit is contained in:
@ -156,6 +156,16 @@ struct _MetaWaylandDragDestFuncs
|
||||
MetaWaylandSurface *surface);
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_WL_SHELL_SURFACE_STATE_NONE,
|
||||
META_WL_SHELL_SURFACE_STATE_TOPLEVEL,
|
||||
META_WL_SHELL_SURFACE_STATE_POPUP,
|
||||
META_WL_SHELL_SURFACE_STATE_TRANSIENT,
|
||||
META_WL_SHELL_SURFACE_STATE_FULLSCREEN,
|
||||
META_WL_SHELL_SURFACE_STATE_MAXIMIZED,
|
||||
} MetaWlShellSurfaceState;
|
||||
|
||||
struct _MetaWaylandSurface
|
||||
{
|
||||
GObject parent;
|
||||
@ -221,6 +231,23 @@ struct _MetaWaylandSurface
|
||||
struct wl_listener destroy_listener;
|
||||
} popup;
|
||||
|
||||
/* wl_shell_surface */
|
||||
struct {
|
||||
MetaWlShellSurfaceState state;
|
||||
|
||||
char *title;
|
||||
char *wm_class;
|
||||
|
||||
gboolean pending_popup;
|
||||
MetaWaylandSurface *parent_surface;
|
||||
GList *children;
|
||||
|
||||
MetaWaylandSeat *popup_seat;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
} wl_shell;
|
||||
|
||||
/* wl_subsurface stuff. */
|
||||
struct {
|
||||
MetaWaylandSurface *parent;
|
||||
|
Reference in New Issue
Block a user