Bug 51081 - Add startup notification information for application launching
Set the event timestamp and icon in application launch context to support startup notification.
This commit is contained in:
parent
6dd302e5ce
commit
7d474b2217
@ -3,6 +3,7 @@
|
|||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
|
const Gdk = imports.gi.Gdk;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
|
||||||
@ -89,7 +90,15 @@ AppDisplayItem.prototype = {
|
|||||||
|
|
||||||
// Opens an application represented by this display item.
|
// Opens an application represented by this display item.
|
||||||
launch : function() {
|
launch : function() {
|
||||||
this._appInfo.launch([], null);
|
let global = Shell.Global.get();
|
||||||
|
let screen = global.screen;
|
||||||
|
let display = screen.get_display();
|
||||||
|
let timestamp = display.get_current_time();
|
||||||
|
let context = new Gdk.AppLaunchContext();
|
||||||
|
let icon = this._appInfo.get_icon();
|
||||||
|
context.set_icon(icon);
|
||||||
|
context.set_timestamp(timestamp);
|
||||||
|
this._appInfo.launch([], context);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user