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

1c7749
From 52536a44e96aa34d3ec3b9332adaa15a6399fc3e Mon Sep 17 00:00:00 2001
1c7749
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
1c7749
Date: Tue, 4 Jun 2019 21:21:37 +0200
1c7749
Subject: [PATCH] workspace-manager: Expose layout properties
1c7749
1c7749
gnome-shell hardcodes a vertical one-column workspace layout, and
1c7749
while not supporting arbitrary grids is very much by design, it
1c7749
currently doesn't have a choice: We simply don't expose the workspace
1c7749
layout we use.
1c7749
1c7749
Change that to allow gnome-shell to be a bit more flexible with the
1c7749
workspace layouts it supports.
1c7749
1c7749
https://gitlab.gnome.org/GNOME/mutter/merge_requests/618
1c7749
---
1c7749
 src/core/meta-workspace-manager.c | 27 +++++++++++++++++++++++++++
1c7749
 1 file changed, 27 insertions(+)
1c7749
1c7749
diff --git a/src/core/meta-workspace-manager.c b/src/core/meta-workspace-manager.c
1c7749
index 8e1f03fe8..fbae34c73 100644
1c7749
--- a/src/core/meta-workspace-manager.c
1c7749
+++ b/src/core/meta-workspace-manager.c
1c7749
@@ -50,6 +50,9 @@ enum
1c7749
 {
1c7749
   PROP_0,
1c7749
 
1c7749
+  PROP_LAYOUT_COLUMNS,
1c7749
+  PROP_LAYOUT_ROWS,
1c7749
+
1c7749
   PROP_N_WORKSPACES
1c7749
 };
1c7749
 
1c7749
@@ -68,6 +71,12 @@ meta_workspace_manager_get_property (GObject    *object,
1c7749
 
1c7749
   switch (prop_id)
1c7749
     {
1c7749
+    case PROP_LAYOUT_COLUMNS:
1c7749
+      g_value_set_int (value, workspace_manager->columns_of_workspaces);
1c7749
+      break;
1c7749
+    case PROP_LAYOUT_ROWS:
1c7749
+      g_value_set_int (value, workspace_manager->rows_of_workspaces);
1c7749
+      break;
1c7749
     case PROP_N_WORKSPACES:
1c7749
       g_value_set_int (value, meta_workspace_manager_get_n_workspaces (workspace_manager));
1c7749
       break;
1c7749
@@ -154,6 +163,22 @@ meta_workspace_manager_class_init (MetaWorkspaceManagerClass *klass)
1c7749
                   0, NULL, NULL, NULL,
1c7749
                   G_TYPE_NONE, 0);
1c7749
 
1c7749
+  g_object_class_install_property (object_class,
1c7749
+                                   PROP_LAYOUT_COLUMNS,
1c7749
+                                   g_param_spec_int ("layout-columns",
1c7749
+                                                     "Layout columns",
1c7749
+                                                     "Number of columns in layout",
1c7749
+                                                     -1, G_MAXINT, 1,
1c7749
+                                                     G_PARAM_READABLE));
1c7749
+
1c7749
+  g_object_class_install_property (object_class,
1c7749
+                                   PROP_LAYOUT_ROWS,
1c7749
+                                   g_param_spec_int ("layout-rows",
1c7749
+                                                     "Layout rows",
1c7749
+                                                     "Number of rows in layout",
1c7749
+                                                     -1, G_MAXINT, -1,
1c7749
+                                                     G_PARAM_READABLE));
1c7749
+
1c7749
   g_object_class_install_property (object_class,
1c7749
                                    PROP_N_WORKSPACES,
1c7749
                                    g_param_spec_int ("n-workspaces",
1c7749
@@ -474,6 +499,8 @@ meta_workspace_manager_update_workspace_layout (MetaWorkspaceManager *workspace_
1c7749
                 workspace_manager->columns_of_workspaces,
1c7749
                 workspace_manager->vertical_workspaces,
1c7749
                 workspace_manager->starting_corner);
1c7749
+  g_object_notify (G_OBJECT (workspace_manager), "layout-columns");
1c7749
+  g_object_notify (G_OBJECT (workspace_manager), "layout-rows");
1c7749
 }
1c7749
 
1c7749
 /**
1c7749
-- 
1c7749
2.21.0
1c7749