[gnome-shell] [AppWell] Make control-click create a new window



commit 470c65d046743e88a8a9f14d390bff665c3a2243
Author: Colin Walters <walters verbum org>
Date:   Tue Sep 8 17:29:22 2009 -0400

    [AppWell] Make control-click create a new window
    
    Implement this for now by just re-launching the application, which
    visually will normally create a new window.
    
    http://bugzilla.gnome.org/show_bug.cgi?id=594565

 js/ui/appDisplay.js |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 58948ff..e806f61 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -735,7 +735,22 @@ RunningWellItem.prototype = {
 
         this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
         this.actor.connect('notify::hover', Lang.bind(this, this._onHoverChanged));
-        this.actor.connect('activate', Lang.bind(this, this.activateMostRecentWindow));
+        this.actor.connect('activate', Lang.bind(this, this._onActivate));
+    },
+
+    _onActivate: function (actor, event) {
+        let modifiers = event.get_state();
+
+        if (this._menuTimeoutId > 0) {
+            Mainloop.source_remove(this._menuTimeoutId);
+            this._menuTimeoutId = 0;
+        }
+
+        if (modifiers & Clutter.ModifierType.CONTROL_MASK) {
+            this.appInfo.launch();
+        } else {
+            this.activateMostRecentWindow();
+        }
     },
 
     activateMostRecentWindow: function () {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]