aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.vala
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-03-30 19:25:21 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-03-30 19:25:21 +0100
commiteacbe640fa7ffb8a99a04ebf21f94982c3679a8c (patch)
tree4fa69148cfa06ee45d84728f2d2196e5be709e88 /src/player-controller.vala
parent6a225f960257026db4c5d57211b4159127bfc3a0 (diff)
downloadayatana-indicator-sound-eacbe640fa7ffb8a99a04ebf21f94982c3679a8c.tar.gz
ayatana-indicator-sound-eacbe640fa7ffb8a99a04ebf21f94982c3679a8c.tar.bz2
ayatana-indicator-sound-eacbe640fa7ffb8a99a04ebf21f94982c3679a8c.zip
MenuItem: use GtkLaunchContext with proper event timeout to launch applications
Also discards non-activation events
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r--src/player-controller.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala
index fd66a8a..764efa5 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -98,11 +98,14 @@ public class PlayerController : GLib.Object
There is a need to wait before the application is on DBus before attempting to access its mpris address
Hence only when the it has registered with us via libindicate do we attempt to kick off mpris communication
*/
- public void instantiate()
+ public void instantiate(uint timestamp)
{
debug("instantiate in player controller for %s", this.app_info.get_name() );
+
try{
- this.app_info.launch(null, null);
+ var context = Gdk.Display.get_default().get_app_launch_context();
+ context.set_timestamp(timestamp);
+ this.app_info.launch(null, context);
this.update_state(state.INSTANTIATING);
}
catch(GLib.Error error){