mirror of
https://github.com/brl/mutter.git
synced 2025-08-10 18:34:42 +00:00
window: Track edge constraints
GTK has the ability to handle client-decorated windows in such a way that the behavior of these windows must match the behavior of the current window manager. In Mutter, windows can be tiled horizontally (and, in the future, vertically as well), which comes with a few requirements that the toolkit must supply. Tiled windows have their borders' behavior changed depending on the tiled position, and the toolkit must be aware of this information in order to properly match the window manager behavior. In order to provide toolkits with more precise and general data regarding resizable and constrained edges, this patch makes MetaWindow track its own edge constraints. This will later be used by the backends to send information to the toolkit. https://bugzilla.gnome.org/show_bug.cgi?id=751857
This commit is contained in:
@@ -129,6 +129,13 @@ typedef struct _MetaPlacementRule
|
||||
int height;
|
||||
} MetaPlacementRule;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_EDGE_CONSTRAINT_NONE = 0,
|
||||
META_EDGE_CONSTRAINT_WINDOW = 1,
|
||||
META_EDGE_CONSTRAINT_MONITOR = 2,
|
||||
} MetaEdgeConstraint;
|
||||
|
||||
struct _MetaWindow
|
||||
{
|
||||
GObject parent_instance;
|
||||
@@ -205,10 +212,17 @@ struct _MetaWindow
|
||||
* that to toggle between normal/tiled or maximized/tiled states. */
|
||||
guint saved_maximize : 1;
|
||||
int tile_monitor_number;
|
||||
int preferred_output_winsys_id;
|
||||
|
||||
/* 0 - top
|
||||
* 1 - right
|
||||
* 2 - bottom
|
||||
* 3 - left */
|
||||
MetaEdgeConstraint edge_constraints[4];
|
||||
|
||||
double tile_hfraction;
|
||||
|
||||
int preferred_output_winsys_id;
|
||||
|
||||
/* Whether we're shaded */
|
||||
guint shaded : 1;
|
||||
|
||||
|
Reference in New Issue
Block a user