Blame SOURCES/0001-screen-Expose-workspace-layout-properties.patch

f73620
From 6b8e2636911c79d77d95aaac62336dd4f4063f63 Mon Sep 17 00:00:00 2001
f73620
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
f73620
Date: Tue, 4 Jun 2019 21:21:37 +0200
f73620
Subject: [PATCH] screen: Expose workspace layout properties
f73620
f73620
gnome-shell hardcodes a vertical one-column workspace layout, and
f73620
while not supporting arbitrary grids is very much by design, it
f73620
currently doesn't have a choice: We simply don't expose the workspace
f73620
layout we use.
f73620
f73620
Change that to allow gnome-shell to be a bit more flexible with the
f73620
workspace layouts it supports.
f73620
f73620
https://gitlab.gnome.org/GNOME/mutter/merge_requests/618
f73620
---
f73620
 src/core/screen.c | 27 +++++++++++++++++++++++++++
f73620
 1 file changed, 27 insertions(+)
f73620
f73620
diff --git a/src/core/screen.c b/src/core/screen.c
f73620
index c14bba0cf..4fac02cdb 100644
f73620
--- a/src/core/screen.c
f73620
+++ b/src/core/screen.c
f73620
@@ -81,6 +81,9 @@ static void on_monitors_changed          (MetaMonitorManager *manager,
f73620
 enum
f73620
 {
f73620
   PROP_N_WORKSPACES = 1,
f73620
+
f73620
+  PROP_LAYOUT_COLUMNS,
f73620
+  PROP_LAYOUT_ROWS,
f73620
 };
f73620
 
f73620
 enum
f73620
@@ -138,6 +141,12 @@ meta_screen_get_property (GObject      *object,
f73620
 
f73620
   switch (prop_id)
f73620
     {
f73620
+    case PROP_LAYOUT_COLUMNS:
f73620
+      g_value_set_int (value, screen->columns_of_workspaces);
f73620
+      break;
f73620
+    case PROP_LAYOUT_ROWS:
f73620
+      g_value_set_int (value, screen->rows_of_workspaces);
f73620
+      break;
f73620
     case PROP_N_WORKSPACES:
f73620
       g_value_set_int (value, meta_screen_get_n_workspaces (screen));
f73620
       break;
f73620
@@ -261,6 +270,22 @@ meta_screen_class_init (MetaScreenClass *klass)
f73620
                   NULL, NULL, NULL,
f73620
 		  G_TYPE_NONE, 0);
f73620
 
f73620
+  g_object_class_install_property (object_class,
f73620
+                                   PROP_LAYOUT_COLUMNS,
f73620
+                                   g_param_spec_int ("layout-columns",
f73620
+                                                     "Layout columns",
f73620
+                                                     "Number of columns in layout",
f73620
+                                                     -1, G_MAXINT, 1,
f73620
+                                                     G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
f73620
+
f73620
+  g_object_class_install_property (object_class,
f73620
+                                   PROP_LAYOUT_ROWS,
f73620
+                                   g_param_spec_int ("layout-rows",
f73620
+                                                     "Layout rows",
f73620
+                                                     "Number of rows in layout",
f73620
+                                                     -1, G_MAXINT, 1,
f73620
+                                                     G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
f73620
+
f73620
   g_object_class_install_property (object_class,
f73620
                                    PROP_N_WORKSPACES,
f73620
                                    pspec);
f73620
@@ -1753,6 +1778,8 @@ meta_screen_update_workspace_layout (MetaScreen *screen)
f73620
                 screen->columns_of_workspaces,
f73620
                 screen->vertical_workspaces,
f73620
                 screen->starting_corner);
f73620
+  g_object_notify (G_OBJECT (screen), "layout-columns");
f73620
+  g_object_notify (G_OBJECT (screen), "layout-rows");
f73620
 }
f73620
 
f73620
 /**
f73620
-- 
f73620
2.21.0
f73620