summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-05-26 01:05:25 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-05-27 13:31:28 -0400
commitcbe5a3a590d66b9bc1c3d152be593a6dced5475d (patch)
treeae33d6cfba7689c22c40f1deb004a0dc4615c5d6 /gdk
parent3741a3bfbe06291abc34cbe25e87315aa667a4e4 (diff)
downloadgtk+-cbe5a3a590d66b9bc1c3d152be593a6dced5475d.tar.gz
Add a tiled window state
This information is needed to draw client-side decorations properly in this state. https://bugzilla.gnome.org/show_bug.cgi?id=696001
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdkevents.h5
-rw-r--r--gdk/x11/gdkdisplay-x11.c19
2 files changed, 23 insertions, 1 deletions
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 999b0d37cb..c0e911cd27 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -460,6 +460,8 @@ typedef enum
* @GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
* @GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
* @GDK_WINDOW_STATE_FOCUSED: the window is presented as focused (with active decorations).
+ * @GDK_WINDOW_TILED: the window is in a tiled state, see
+ * gdk_window_get_tiled_edges() for more details. Since 3.10
*
* Specifies the state of a toplevel window.
*/
@@ -472,7 +474,8 @@ typedef enum
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
GDK_WINDOW_STATE_ABOVE = 1 << 5,
GDK_WINDOW_STATE_BELOW = 1 << 6,
- GDK_WINDOW_STATE_FOCUSED = 1 << 7
+ GDK_WINDOW_STATE_FOCUSED = 1 << 7,
+ GDK_WINDOW_STATE_TILED = 1 << 8
} GdkWindowState;
/**
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index f3541323f4..42ed1531fb 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -247,6 +247,25 @@ do_net_wm_state_changes (GdkWindow *window)
GDK_WINDOW_STATE_MAXIMIZED);
}
+ /* FIXME: we rely on implementation details of mutter here:
+ * mutter only tiles horizontally, and sets maxvert when it does
+ * and if it tiles, it always affects all edges
+ */
+ if (old_state & GDK_WINDOW_STATE_TILED)
+ {
+ if (!toplevel->have_maxvert)
+ gdk_synthesize_window_state (window,
+ GDK_WINDOW_STATE_TILED,
+ 0);
+ }
+ else
+ {
+ if (toplevel->have_maxvert)
+ gdk_synthesize_window_state (window,
+ 0,
+ GDK_WINDOW_STATE_TILED);
+ }
+
if (old_state & GDK_WINDOW_STATE_FOCUSED)
{
if (!toplevel->have_focused)