From 7d474b2217221569b549f51e325b28aba9e8b604 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 10 Feb 2009 10:57:59 -0500 Subject: [PATCH] Bug 51081 - Add startup notification information for application launching Set the event timestamp and icon in application launch context to support startup notification. --- js/ui/appDisplay.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 4447bff32..97d533566 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -3,6 +3,7 @@ const Clutter = imports.gi.Clutter; const Gio = imports.gi.Gio; const Gtk = imports.gi.Gtk; +const Gdk = imports.gi.Gdk; const Shell = imports.gi.Shell; const Signals = imports.signals; @@ -89,7 +90,15 @@ AppDisplayItem.prototype = { // Opens an application represented by this display item. 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); } };