summaryrefslogtreecommitdiff
path: root/src/core/window-private.h
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-24 11:30:54 +0100
committerStefano Karapetsas <[email protected]>2014-01-24 11:30:54 +0100
commit1b21c86f638514dd5ac4bd165601b2fef4743287 (patch)
treed9ed65a1bf2e8b11e1510f07e876deb3425ada9f /src/core/window-private.h
parente34bef124252b86e118019b78e2abbb8abfe0540 (diff)
parent6ef9c1061ec0bb78bf773f69a50d556ce8e23c01 (diff)
downloadmarco-1b21c86f638514dd5ac4bd165601b2fef4743287.tar.bz2
marco-1b21c86f638514dd5ac4bd165601b2fef4743287.tar.xz
Merge branch 'master' of github.com:mate-desktop/marco
Diffstat (limited to 'src/core/window-private.h')
-rw-r--r--src/core/window-private.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 447a2c4b..f88f8a4d 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -83,6 +83,13 @@ typedef enum {
#define NUMBER_OF_QUEUES 3
+typedef enum {
+ META_TILE_NONE,
+ META_TILE_LEFT,
+ META_TILE_RIGHT,
+ META_TILE_MAXIMIZE
+} MetaTileMode;
+
struct _MetaWindow
{
MetaDisplay *display;
@@ -138,6 +145,11 @@ struct _MetaWindow
guint maximize_vertically_after_placement : 1;
guint minimize_after_placement : 1;
+ /* The current or requested tile mode. If maximized_vertically is true,
+ * this is the current mode. If not, it is the mode which will be
+ * requested after the window grab is released */
+ guint tile_mode : 2;
+
/* Whether we're shaded */
guint shaded : 1;
@@ -383,8 +395,11 @@ struct _MetaWindow
(w)->maximized_vertically)
#define META_WINDOW_MAXIMIZED_VERTICALLY(w) ((w)->maximized_vertically)
#define META_WINDOW_MAXIMIZED_HORIZONTALLY(w) ((w)->maximized_horizontally)
+#define META_WINDOW_TILED(w) ((w)->maximized_vertically && \
+ !(w)->maximized_horizontally && \
+ (w)->tile_mode != META_TILE_NONE)
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
-#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !(w)->fullscreen && !(w)->shaded)
+#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED(w) && !(w)->fullscreen && !(w)->shaded)
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
(((w)->size_hints.min_width < (w)->size_hints.max_width) || \
((w)->size_hints.min_height < (w)->size_hints.max_height)))
@@ -575,6 +590,8 @@ void meta_window_get_work_area_for_xinerama (MetaWindow *window,
void meta_window_get_work_area_all_xineramas (MetaWindow *window,
MetaRectangle *area);
+void meta_window_get_current_tile_area (MetaWindow *window,
+ MetaRectangle *tile_area);
gboolean meta_window_same_application (MetaWindow *window,
MetaWindow *other_window);