shell-app: Add "discrete_gpu" option when launching apps
And adapt existing callers to the new API. This will allow us to implement a way to launch applications on the discrete GPU for systems where an "Optimus" system exists. https://bugzilla.gnome.org/show_bug.cgi?id=773117
This commit is contained in:
@ -94,7 +94,7 @@ function spawnApp(argv) {
|
||||
Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION);
|
||||
|
||||
let context = global.create_app_launch_context(0, -1);
|
||||
app.launch([], context);
|
||||
app.launch([], context, false);
|
||||
} catch(err) {
|
||||
_handleSpawnError(argv[0], err);
|
||||
}
|
||||
|
@ -902,7 +902,7 @@ const EventsSection = new Lang.Class({
|
||||
let app = this._getCalendarApp();
|
||||
if (app.get_id() == 'evolution.desktop')
|
||||
app = Gio.DesktopAppInfo.new('evolution-calendar.desktop');
|
||||
app.launch([], global.create_app_launch_context(0, -1));
|
||||
app.launch([], global.create_app_launch_context(0, -1), false);
|
||||
},
|
||||
|
||||
setDate: function(date) {
|
||||
|
@ -64,7 +64,8 @@ function startAppForMount(app, mount) {
|
||||
|
||||
try {
|
||||
retval = app.launch(files,
|
||||
global.create_app_launch_context(0, -1))
|
||||
global.create_app_launch_context(0, -1),
|
||||
false)
|
||||
} catch (e) {
|
||||
log('Unable to launch the application ' + app.get_name()
|
||||
+ ': ' + e.toString());
|
||||
|
@ -297,7 +297,7 @@ const RemoteSearchProvider = new Lang.Class({
|
||||
// the provider is not compatible with the new version of the interface, launch
|
||||
// the app itself but warn so we can catch the error in logs
|
||||
log('Search provider ' + this.appInfo.get_id() + ' does not implement LaunchSearch');
|
||||
this.appInfo.launch([], global.create_app_launch_context(0, -1));
|
||||
this.appInfo.launch([], global.create_app_launch_context(0, -1), false);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1501,7 +1501,7 @@ const NMVPNSection = new Lang.Class({
|
||||
if (nItems > 1) {
|
||||
let appSys = Shell.AppSystem.get_default();
|
||||
let app = appSys.lookup_app('gnome-network-panel.desktop');
|
||||
app.launch(0, -1);
|
||||
app.launch(0, -1, false);
|
||||
} else {
|
||||
let connection = this._connections[0];
|
||||
Util.spawnApp(['gnome-control-center', 'network', 'show-device',
|
||||
|
Reference in New Issue
Block a user