From e537791fe2fc5ccfeb55220360adc80b0d77179a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 30 Oct 2016 22:57:23 +0100 Subject: [PATCH] Update to 3.23.1 --- .gitignore | 1 + ...d-shell_app_launch_context-helper-AP.patch | 77 -------------- ...dd-a-menu-item-to-launch-on-the-disc.patch | 100 ------------------ gnome-shell.spec | 13 +-- sources | 2 +- 5 files changed, 7 insertions(+), 186 deletions(-) delete mode 100644 0001-f25-shell-app-Add-shell_app_launch_context-helper-AP.patch delete mode 100644 0002-f25-appDisplay-Add-a-menu-item-to-launch-on-the-disc.patch diff --git a/.gitignore b/.gitignore index 0fd9a40..7b05b51 100644 --- a/.gitignore +++ b/.gitignore @@ -121,3 +121,4 @@ gnome-shell-2.31.5.tar.bz2 /gnome-shell-3.21.92.tar.xz /gnome-shell-3.22.0.tar.xz /gnome-shell-3.22.1.tar.xz +/gnome-shell-3.23.1.tar.xz diff --git a/0001-f25-shell-app-Add-shell_app_launch_context-helper-AP.patch b/0001-f25-shell-app-Add-shell_app_launch_context-helper-AP.patch deleted file mode 100644 index 4d84532..0000000 --- a/0001-f25-shell-app-Add-shell_app_launch_context-helper-AP.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 02bcc5fa3d3d3362594a2c68f9bf80556b93dd77 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Wed, 19 Oct 2016 15:43:37 +0200 -Subject: [PATCH 1/2] shell-app: Add shell_app_launch_context() helper API - -This will allow us to implement a way to launch applications -on the discrete GPU for systems where an "Optimus" system exists, -through the caller setting an environment variable. - -https://bugzilla.gnome.org/show_bug.cgi?id=773117 ---- - src/shell-app.c | 29 +++++++++++++++++++---------- - src/shell-app.h | 4 ++++ - 2 files changed, 23 insertions(+), 10 deletions(-) - -diff --git a/src/shell-app.c b/src/shell-app.c -index 7f61dc3..7eec4ae 100644 ---- a/src/shell-app.c -+++ b/src/shell-app.c -@@ -1227,20 +1227,29 @@ shell_app_launch (ShellApp *app, - - global = shell_global_get (); - context = shell_global_create_app_launch_context (global, timestamp, workspace); -+ ret = shell_app_launch_context (app, context, error); -+ g_object_unref (context); -+ -+ return ret; -+} -+ -+gboolean -+shell_app_launch_context (ShellApp *app, -+ GAppLaunchContext *context, -+ GError **error) -+{ -+ g_return_val_if_fail (app->info != NULL, FALSE); - -- ret = g_desktop_app_info_launch_uris_as_manager (app->info, NULL, -- context, -- G_SPAWN_SEARCH_PATH, -+ return g_desktop_app_info_launch_uris_as_manager (app->info, NULL, -+ context, -+ G_SPAWN_SEARCH_PATH, - #ifdef HAVE_SYSTEMD -- app_child_setup, (gpointer)shell_app_get_id (app), -+ app_child_setup, (gpointer)shell_app_get_id (app), - #else -- NULL, NULL, -+ NULL, NULL, - #endif -- NULL, NULL, -- error); -- g_object_unref (context); -- -- return ret; -+ NULL, NULL, -+ error); - } - - /** -diff --git a/src/shell-app.h b/src/shell-app.h -index 7fc582a..2a7572a 100644 ---- a/src/shell-app.h -+++ b/src/shell-app.h -@@ -56,6 +56,10 @@ gboolean shell_app_launch (ShellApp *app, - int workspace, - GError **error); - -+gboolean shell_app_launch_context (ShellApp *app, -+ GAppLaunchContext *context, -+ GError **error); -+ - void shell_app_launch_action (ShellApp *app, - const char *action_name, - guint timestamp, --- -2.9.3 - diff --git a/0002-f25-appDisplay-Add-a-menu-item-to-launch-on-the-disc.patch b/0002-f25-appDisplay-Add-a-menu-item-to-launch-on-the-disc.patch deleted file mode 100644 index 3a6d34a..0000000 --- a/0002-f25-appDisplay-Add-a-menu-item-to-launch-on-the-disc.patch +++ /dev/null @@ -1,100 +0,0 @@ -From ba3354d5c9713eeb03980427c32db3d8b9fea9c7 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Wed, 19 Oct 2016 15:58:16 +0200 -Subject: [PATCH 2/2] appDisplay: Add a menu item to launch on the discrete GPU - -It will only show up when a discrete GPU is available (detected through -the switcheroo-control D-Bus service), and the application hasn't -alreayd been launched. - -Note that this will not currently work for D-Bus activated applications, -eg. the menu item will be not available, as we don't have a way to pass -the environment variable through to D-Bus to use to launch the application. - -https://bugzilla.gnome.org/show_bug.cgi?id=773117 ---- - js/ui/appDisplay.js | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 54 insertions(+) - -diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js -index cae1757..6b1d04f 100644 ---- a/js/ui/appDisplay.js -+++ b/js/ui/appDisplay.js -@@ -60,6 +60,18 @@ const PAGE_SWITCH_TIME = 0.3; - const VIEWS_SWITCH_TIME = 0.4; - const VIEWS_SWITCH_ANIMATION_DELAY = 0.1; - -+const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl'; -+const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl'; -+ -+const SwitcherooProxyInterface = ' \ -+ \ -+ \ -+ \ -+'; -+ -+const SwitcherooProxy = Gio.DBusProxy.makeProxyWrapper(SwitcherooProxyInterface); -+let discreteGpuAvailable = false; -+ - function _getCategories(info) { - let categoriesStr = info.get_categories(); - if (!categoriesStr) -@@ -969,6 +981,32 @@ const AppDisplay = new Lang.Class({ - initialView = Views.ALL; - this._showView(initialView); - this._updateFrequentVisibility(); -+ -+ Gio.DBus.system.watch_name(SWITCHEROO_BUS_NAME, -+ Gio.BusNameWatcherFlags.NONE, -+ Lang.bind(this, this._switcherooProxyAppeared), -+ Lang.bind(this, function() { -+ this._switcherooProxy = null; -+ this._updateDiscreteGpuAvailable(); -+ })); -+ }, -+ -+ _updateDiscreteGpuAvailable: function() { -+ if (!this._switcherooProxy) -+ discreteGpuAvailable = false; -+ else -+ discreteGpuAvailable = this._switcherooProxy.HasDualGpu; -+ }, -+ -+ _switcherooProxyAppeared: function() { -+ this._switcherooProxy = new SwitcherooProxy(Gio.DBus.system, SWITCHEROO_BUS_NAME, SWITCHEROO_OBJECT_PATH, -+ Lang.bind(this, function(proxy, error) { -+ if (error) { -+ log(error.message); -+ return; -+ } -+ this._updateDiscreteGpuAvailable(); -+ })); - }, - - animate: function(animationDirection, onComplete) { -@@ -1861,6 +1899,22 @@ const AppIconMenu = new Lang.Class({ - this._appendSeparator(); - } - -+ if (discreteGpuAvailable && -+ this._source.app.state == Shell.AppState.STOPPED && -+ !this._source.app.app_info.get_boolean('DBusActivatable')) { -+ this._onDiscreteGpuMenuItem = this._appendMenuItem(_("Launch using Dedicated Graphics Card")); -+ this._onDiscreteGpuMenuItem.connect('activate', Lang.bind(this, function() { -+ if (this._source.app.state != Shell.AppState.STOPPED) -+ return; -+ -+ let context = global.create_app_launch_context(0, -1); -+ context.setenv('DRI_PRIME', '1'); -+ -+ this._source.app.launch_context(context); -+ this.emit('activate-window', null); -+ })); -+ } -+ - for (let i = 0; i < actions.length; i++) { - let action = actions[i]; - let item = this._appendMenuItem(appInfo.get_action_name(action)); --- -2.9.3 - diff --git a/gnome-shell.spec b/gnome-shell.spec index c20f666..bef4904 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -1,6 +1,6 @@ Name: gnome-shell -Version: 3.22.1 -Release: 2%{?dist} +Version: 3.23.1 +Release: 1%{?dist} Summary: Window management and application launching for GNOME Group: User Interface/Desktops @@ -13,10 +13,6 @@ Source0: http://download.gnome.org/sources/gnome-shell/3.22/%{name}-%{ver # Replace Epiphany with Firefox in the default favourite apps list Patch1: gnome-shell-favourite-apps-firefox.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=773117 without the internal API break -Patch2: 0001-f25-shell-app-Add-shell_app_launch_context-helper-AP.patch -Patch3: 0002-f25-appDisplay-Add-a-menu-item-to-launch-on-the-disc.patch - %define gnome_bluetooth_version 1:3.9.0 %define gobject_introspection_version 1.45.4 %define gjs_version 1.39.0 @@ -120,8 +116,6 @@ easy to use experience. %prep %setup -q %patch1 -p1 -b .firefox -%patch2 -p1 -%patch3 -p1 %build (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi; @@ -191,6 +185,9 @@ glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas &> /dev/null %exclude %{_datadir}/gtk-doc %changelog +* Sun Oct 30 2016 Florian Müllner - 3.23.1-1 +- Update to 3.23.1 + * Fri Oct 21 2016 Bastien Nocera - 3.22.1-2 - Add patches to allow launching on discrete GPU when available diff --git a/sources b/sources index 27d515c..d294a8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -457ba7e03e72fff66c546a21ad8cc42a gnome-shell-3.22.1.tar.xz +d4b2a8a5796c6c542c813a85b63e6e41 gnome-shell-3.23.1.tar.xz