[Pkg-mozext-commits] [tabmixplus] 23/26: Alt-Tab breaks double-click and click and drag on Tab-bar. Related to changesets 0584f2b0ae81, a1df6eab9f86

David Prévot taffit at moszumanska.debian.org
Fri Mar 25 21:56:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 0.4.2.3pre.160319a1
in repository tabmixplus.

commit 63179a277b69b90029cbb9349bfe09f7343669fc
Author: onemen <tabmix.onemen at gmail.com>
Date:   Fri Mar 18 08:58:38 2016 +0200

    Alt-Tab breaks double-click and click and drag on Tab-bar. Related to changesets 0584f2b0ae81, a1df6eab9f86
---
 chrome/content/flst/lasttab.js | 15 +++++++++++++--
 chrome/content/tab/tab.js      |  3 +++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/chrome/content/flst/lasttab.js b/chrome/content/flst/lasttab.js
index 9f2b2d9..8cd6e81 100644
--- a/chrome/content/flst/lasttab.js
+++ b/chrome/content/flst/lasttab.js
@@ -51,7 +51,7 @@ var TMP_LastTab = {
 
     let tabBox = gBrowser.mTabBox;
     let els = Cc["@mozilla.org/eventlistenerservice;1"]
-    .getService(Ci.nsIEventListenerService);
+                .getService(Ci.nsIEventListenerService);
     if (Tabmix.isVersion(320)) {
       els.removeSystemEventListener(tabBox._eventNode, "keydown", tabBox, false);
     } else {
@@ -60,6 +60,9 @@ var TMP_LastTab = {
     }
     els.addSystemEventListener(tabBox._eventNode, "keydown", this, false);
     els.addSystemEventListener(tabBox._eventNode, "keyup", this, false);
+    if (!Tabmix.isVersion(470)) {
+      els.addSystemEventListener(window, "focus", this, true);
+    }
 
     // if session manager select other tab then the first one we need to build
     // TabHistory in two steps to maintain natural Ctrl-Tab order.
@@ -79,15 +82,23 @@ var TMP_LastTab = {
 
     let tabBox = gBrowser.mTabBox;
     let els = Cc["@mozilla.org/eventlistenerservice;1"]
-    .getService(Ci.nsIEventListenerService);
+                .getService(Ci.nsIEventListenerService);
     els.removeSystemEventListener(tabBox._eventNode, "keydown", this, false);
     els.removeSystemEventListener(tabBox._eventNode, "keyup", this, false);
     if (!Tabmix.isVersion(320))
       els.removeSystemEventListener(tabBox._eventNode, "keypress", this, false);
+    if (!Tabmix.isVersion(470)) {
+      els.removeSystemEventListener(window, "focus", this, true);
+    }
   },
 
   handleEvent: function(event) {
     switch (event.type) {
+      case "focus":
+        if (event.target == window.content) {
+          Tabmix.keyModifierDown = false;
+        }
+        break;
       case "blur":
         this.updateDisallowDrag(false);
         break;
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 9f021ac..966281c 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -686,6 +686,9 @@ Tabmix.tabsUtils = {
   handleEvent: function(aEvent) {
     switch (aEvent.type) {
       case "MozMouseHittest":
+        if (Tabmix.keyModifierDown && !document.hasFocus()) {
+          Tabmix.keyModifierDown = false;
+        }
         if (aEvent.button === 0 && (Tabmix.keyModifierDown || aEvent.detail > 0))
           aEvent.stopPropagation();
         break;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list