On Tue, 31 Jul 2018 at 11:38:47 +0100, Simon McVittie wrote: > According to codesearch.debian.net, this extension uses the MetaScreen > via global.screen.
The attached patch seems to work. I've forwarded it to <https://github.com/mlutfy/hidetopbar/pull/163>. smcv
>From 2c613f8ad920081df1f70e38a41292fcac435722 Mon Sep 17 00:00:00 2001 From: Simon McVittie <[email protected]> Date: Mon, 6 Aug 2018 20:37:40 +0100 Subject: [PATCH] Adapt to removal of MetaScreen in mutter 3.29.x If running under GNOME Shell 3.29.x, use display, layout manager or workspace manager (as appropriate) to replace uses of MetaScreen, which was removed in mutter 3.29.x. Closes: #905111 --- debian/changelog | 9 ++ ...moval-of-MetaScreen-in-mutter-3.29.x.patch | 99 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 109 insertions(+) create mode 100644 debian/patches/Adapt-to-removal-of-MetaScreen-in-mutter-3.29.x.patch create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index a8240c9..f7081f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +gnome-shell-extension-autohidetopbar (20180511-1.1) UNRELEASED; urgency=medium + + * d/p/Adapt-to-removal-of-MetaScreen-in-mutter-3.29.x.patch: + If running under GNOME Shell 3.29.x, use display, layout manager or + workspace manager (as appropriate) to replace uses of MetaScreen, + which was removed in mutter 3.29.x (Closes: #905111) + + -- Simon McVittie <[email protected]> Mon, 06 Aug 2018 20:35:26 +0100 + gnome-shell-extension-autohidetopbar (20180511-1) unstable; urgency=medium * New upstream git snapshot. diff --git a/debian/patches/Adapt-to-removal-of-MetaScreen-in-mutter-3.29.x.patch b/debian/patches/Adapt-to-removal-of-MetaScreen-in-mutter-3.29.x.patch new file mode 100644 index 0000000..8ba99a4 --- /dev/null +++ b/debian/patches/Adapt-to-removal-of-MetaScreen-in-mutter-3.29.x.patch @@ -0,0 +1,99 @@ +From: Simon McVittie <[email protected]> +Date: Mon, 6 Aug 2018 20:34:59 +0100 +Subject: Adapt to removal of MetaScreen in mutter 3.29.x + +If running under GNOME Shell 3.29.x, use display, layout manager or +workspace manager (as appropriate) to replace uses of MetaScreen, which +was removed in mutter 3.29.x. + +Bug: https://github.com/mlutfy/hidetopbar/issues/162 +Bug-Debian: https://bugs.debian.org/905111 +Signed-off-by: Simon McVittie <[email protected]> +Forwarded: https://github.com/mlutfy/hidetopbar/pull/163 +--- + intellihide.js | 24 +++++++++++++++++++++--- + panelVisibilityManager.js | 8 +++++++- + 2 files changed, 28 insertions(+), 4 deletions(-) + +diff --git a/intellihide.js b/intellihide.js +index f992e28..b684b1c 100644 +--- a/intellihide.js ++++ b/intellihide.js +@@ -75,6 +75,18 @@ var intellihide = new Lang.Class({ + this._checkOverlapTimeoutContinue = false; + this._checkOverlapTimeoutId = 0; + ++ let stackingManager; ++ if (global.screen) ++ stackingManager = global.screen; // mutter < 3.29 ++ else ++ stackingManager = global.display; // mutter >= 3.29 ++ ++ let monitorManager; ++ if (global.screen) ++ monitorManager = global.screen; // mutter < 3.29 ++ else ++ monitorManager = Main.layoutManager; // mutter >= 3.29 ++ + // Connect global signals + this._signalsHandler.add([ + // Listen for notification banners to appear or disappear +@@ -93,7 +105,7 @@ var intellihide = new Lang.Class({ + ], [ + // triggered for instance when the window list order changes, + // included when the workspace is switched +- global.screen, ++ stackingManager, + 'restacked', + Lang.bind(this, this._checkOverlap) + ], [ +@@ -104,7 +116,7 @@ var intellihide = new Lang.Class({ + Lang.bind(this, this._checkOverlap) + ], [ + // update wne monitor changes, for instance in multimonitor when monitor are attached +- global.screen, ++ monitorManager, + 'monitors-changed', + Lang.bind(this, this._checkOverlap ) + ]); +@@ -270,7 +282,13 @@ var intellihide = new Lang.Class({ + return false; + } + +- let currentWorkspace = global.screen.get_active_workspace_index(); ++ let workspaceManager; ++ if (global.screen) ++ workspaceManager = global.screen; // mutter < 3.29 ++ else ++ workspaceManager = global.workspace_manager; // mutter >= 3.29 ++ ++ let currentWorkspace = workspaceManager.get_active_workspace_index(); + let wksp = meta_win.get_workspace(); + let wksp_index = wksp.index(); + +diff --git a/panelVisibilityManager.js b/panelVisibilityManager.js +index 5c187fe..a546d54 100644 +--- a/panelVisibilityManager.js ++++ b/panelVisibilityManager.js +@@ -319,6 +319,12 @@ var PanelVisibilityManager = new Lang.Class({ + }, + + _bindUIChanges: function () { ++ let monitorManager; ++ if (global.screen) ++ monitorManager = global.screen; // mutter < 3.29 ++ else ++ monitorManager = Main.layoutManager; // mutter >= 3.29 ++ + this._signalsHandler = new Convenience.GlobalSignalsHandler(); + this._signalsHandler.add( + [ +@@ -355,7 +361,7 @@ var PanelVisibilityManager = new Lang.Class({ + }) + ], + [ +- global.screen, ++ monitorManager, + 'monitors-changed', + Lang.bind(this, function () { + this._base_y = PanelBox.y; diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..180e34a --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +Adapt-to-removal-of-MetaScreen-in-mutter-3.29.x.patch -- 2.18.0

