From db0f85ba5d44e061eb5b2d5b36a3c2721e1abbd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 13 Jun 2019 15:49:26 +0200 Subject: [PATCH] window: Add tile mode getter Lets avoid peeking in the MetaWindow struct itself and add a getter for the relevant state. https://gitlab.gnome.org/GNOME/mutter/merge_requests/621 --- src/core/window-private.h | 1 + src/core/window.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/core/window-private.h b/src/core/window-private.h index eb497659f..6a27949c8 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -626,6 +626,7 @@ void meta_window_queue (MetaWindow *window, guint queuebits); void meta_window_tile (MetaWindow *window, MetaTileMode mode); +MetaTileMode meta_window_get_tile_mode (MetaWindow *window); void meta_window_restore_tile (MetaWindow *window, MetaTileMode mode, int width, diff --git a/src/core/window.c b/src/core/window.c index d8384c3a8..c1179c6ad 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -3210,6 +3210,12 @@ meta_window_tile (MetaWindow *window, meta_frame_queue_draw (window->frame); } +MetaTileMode +meta_window_get_tile_mode (MetaWindow *window) +{ + return window->tile_mode; +} + void meta_window_restore_tile (MetaWindow *window, MetaTileMode mode,