diff options
Diffstat (limited to 'src/metadata-menu-item.vala')
-rw-r--r-- | src/metadata-menu-item.vala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala index b2dd752..bcd4378 100644 --- a/src/metadata-menu-item.vala +++ b/src/metadata-menu-item.vala @@ -168,13 +168,16 @@ public class MetadataMenuitem : PlayerItem public override void handle_event (string name, Variant input_value, uint timestamp) - { + { + if (name != Dbusmenu.MENUITEM_EVENT_ACTIVATED) + return; + if(this.owner.current_state == PlayerController.state.OFFLINE) { - this.owner.instantiate(); + this.owner.instantiate(timestamp); } else if(this.owner.current_state == PlayerController.state.CONNECTED){ - this.owner.mpris_bridge.expose(); + this.owner.mpris_bridge.expose(timestamp); } } |