[mutter] window: Add tile mode getter



commit db0f85ba5d44e061eb5b2d5b36a3c2721e1abbd6
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Jun 13 15:49:26 2019 +0200

    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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]