summaryrefslogtreecommitdiff
path: root/src/core/window-private.h
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-24 09:21:38 +0100
committerStefano Karapetsas <[email protected]>2014-01-24 09:21:38 +0100
commit6f4ee23657a8fbaed9cc89e56e08b543203fefd3 (patch)
tree0866b9f11b0c1561ab03853d2d6efd2cbcbe0aeb /src/core/window-private.h
parent534f563ef5647a5d6359078b3c0c8eaba1aec877 (diff)
parenta87157176ca6e01c8c4047999ee584f00b63c11e (diff)
downloadmarco-6f4ee23657a8fbaed9cc89e56e08b543203fefd3.tar.bz2
marco-6f4ee23657a8fbaed9cc89e56e08b543203fefd3.tar.xz
Merge branch '1.7.0-window-snapping'
Diffstat (limited to 'src/core/window-private.h')
-rw-r--r--src/core/window-private.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 447a2c4b..02c518e0 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -83,6 +83,12 @@ typedef enum {
#define NUMBER_OF_QUEUES 3
+typedef enum {
+ META_TILE_NONE,
+ META_TILE_LEFT,
+ META_TILE_RIGHT
+} MetaTileMode;
+
struct _MetaWindow
{
MetaDisplay *display;
@@ -138,6 +144,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 +394,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 +589,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);