diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-11-09 16:47:01 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-11-09 16:47:01 -0500 |
commit | 75b5522073eda617ed4933ea7bd983e76a2b7a3e (patch) | |
tree | e763f0461d3a31f1124a9b132a823c46c509f53c | |
parent | ce679ddae05700b546db0a5d63032df6cde506b3 (diff) | |
download | pentadactyl-75b5522073eda617ed4933ea7bd983e76a2b7a3e.tar.gz |
Don't use a popuppanel for the visual bell if possible.
Update issue #125
This should no longer be a problem after tonight's nightly on
Firefox 4.
-rw-r--r-- | common/content/bookmarks.js | 2 | ||||
-rw-r--r-- | common/content/dactyl.js | 28 | ||||
-rw-r--r-- | common/content/dactyl.xul | 6 |
3 files changed, 24 insertions, 12 deletions
diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index aca597d3..f1eda8ef 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -38,7 +38,7 @@ const Bookmarks = Module("bookmarks", { try { let uri = util.createURI(url); - if (!force && bookmarks.isBookmarked(uri.spec)) + if (!force && this.isBookmarked(uri.spec)) for (let bmark in bookmarkcache) if (bmark.url == uri.spec) { var id = bmark.id; diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 63de20dd..8cc6059c 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -139,16 +139,24 @@ const Dactyl = Module("dactyl", { beep: requiresMainThread(function () { if (options["visualbell"]) { // flash the visual bell - let popup = document.getElementById("dactyl-visualbell"); - let win = config.visualbellWindow; - let rect = win.getBoundingClientRect(); - let width = rect.right - rect.left; - let height = rect.bottom - rect.top; - - // NOTE: this doesn't seem to work in FF3 with full box dimensions - popup.openPopup(win, "overlap", 1, 1, false, false); - popup.sizeTo(width - 2, height - 2); - util.timeout(function () { popup.hidePopup(); }, 20); + let popup = document.getElementById("dactyl-deck-bell"); + if (popup) { + let restore = popup.parentNode.selectedPanel; + popup.parentNode.selectedPanel = popup; + util.timeout(function () { popup.parentNode.selectedPanel = restore; }, 20); + } + else { + popup = document.getElementById("dactyl-popup-bell"); + let win = config.visualbellWindow; + let rect = win.getBoundingClientRect(); + let width = rect.right - rect.left; + let height = rect.bottom - rect.top; + + // NOTE: this doesn't seem to work in FF3 with full box dimensions + popup.openPopup(win, "overlap", 1, 1, false, false); + popup.sizeTo(width - 2, height - 2); + util.timeout(function () { popup.hidePopup(); }, 20); + } } else { let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound); diff --git a/common/content/dactyl.xul b/common/content/dactyl.xul index 956c986d..ea2c4e32 100644 --- a/common/content/dactyl.xul +++ b/common/content/dactyl.xul @@ -28,7 +28,7 @@ <window id="&dactyl.mainWindow;"> <popupset> - <panel id="dactyl-visualbell" dactyl:highlight="Bell" + <panel id="dactyl-popup-bell" dactyl:highlight="Bell" noautohide="true" noautofocus="true"/> <menupopup id="dactyl-contextmenu" @@ -54,6 +54,10 @@ oncommandupdate="&events;.onSelectionChange(event);"/> </window> + <deck id="tab-view-deck"> + <vbox id="dactyl-deck-bell" dactyl:highlight="Bell"/> + </deck> + <vbox id="&dactyl.commandContainer;"> <vbox class="dactyl-container" hidden="false" collapsed="true"> |