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

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