mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
wayland: add extended state for tiled
xdg-shell allows desktop environments to extend the list of states within a given range. Use this possibility to add a new state for tiled so that gtk+ can benefit from this. https://bugzilla.gnome.org/show_bug.cgi?id=766860
This commit is contained in:
parent
2292458f5e
commit
e7430a4535
@ -35,6 +35,13 @@
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
#include "xdg-shell-unstable-v5-server-protocol.h"
|
||||
|
||||
/*
|
||||
* Define GNOME additional states to xdg-shell
|
||||
* The current reserved range for GNOME is 0x1000 - 0x1FFF
|
||||
*/
|
||||
|
||||
#define XDG_SURFACE_STATE_GNOME_TILED 0x1000
|
||||
|
||||
struct _MetaWaylandXdgSurface
|
||||
{
|
||||
MetaWaylandSurfaceRoleShellSurface parent;
|
||||
@ -399,6 +406,13 @@ fill_states (struct wl_array *states, MetaWindow *window)
|
||||
s = wl_array_add (states, sizeof *s);
|
||||
*s = XDG_SURFACE_STATE_ACTIVATED;
|
||||
}
|
||||
/* GNOME extension to xdg-shell states */
|
||||
if (window->tile_mode == META_TILE_LEFT ||
|
||||
window->tile_mode == META_TILE_RIGHT)
|
||||
{
|
||||
s = wl_array_add (states, sizeof *s);
|
||||
*s = XDG_SURFACE_STATE_GNOME_TILED;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user