mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-20 02:55:46 +01:00
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.
This commit is contained in:
@@ -38,7 +38,7 @@ const Bookmarks = Module("bookmarks", {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
let uri = util.createURI(url);
|
let uri = util.createURI(url);
|
||||||
if (!force && bookmarks.isBookmarked(uri.spec))
|
if (!force && this.isBookmarked(uri.spec))
|
||||||
for (let bmark in bookmarkcache)
|
for (let bmark in bookmarkcache)
|
||||||
if (bmark.url == uri.spec) {
|
if (bmark.url == uri.spec) {
|
||||||
var id = bmark.id;
|
var id = bmark.id;
|
||||||
|
|||||||
@@ -139,16 +139,24 @@ const Dactyl = Module("dactyl", {
|
|||||||
beep: requiresMainThread(function () {
|
beep: requiresMainThread(function () {
|
||||||
if (options["visualbell"]) {
|
if (options["visualbell"]) {
|
||||||
// flash the visual bell
|
// flash the visual bell
|
||||||
let popup = document.getElementById("dactyl-visualbell");
|
let popup = document.getElementById("dactyl-deck-bell");
|
||||||
let win = config.visualbellWindow;
|
if (popup) {
|
||||||
let rect = win.getBoundingClientRect();
|
let restore = popup.parentNode.selectedPanel;
|
||||||
let width = rect.right - rect.left;
|
popup.parentNode.selectedPanel = popup;
|
||||||
let height = rect.bottom - rect.top;
|
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
|
// NOTE: this doesn't seem to work in FF3 with full box dimensions
|
||||||
popup.openPopup(win, "overlap", 1, 1, false, false);
|
popup.openPopup(win, "overlap", 1, 1, false, false);
|
||||||
popup.sizeTo(width - 2, height - 2);
|
popup.sizeTo(width - 2, height - 2);
|
||||||
util.timeout(function () { popup.hidePopup(); }, 20);
|
util.timeout(function () { popup.hidePopup(); }, 20);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound);
|
let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<window id="&dactyl.mainWindow;">
|
<window id="&dactyl.mainWindow;">
|
||||||
|
|
||||||
<popupset>
|
<popupset>
|
||||||
<panel id="dactyl-visualbell" dactyl:highlight="Bell"
|
<panel id="dactyl-popup-bell" dactyl:highlight="Bell"
|
||||||
noautohide="true" noautofocus="true"/>
|
noautohide="true" noautofocus="true"/>
|
||||||
|
|
||||||
<menupopup id="dactyl-contextmenu"
|
<menupopup id="dactyl-contextmenu"
|
||||||
@@ -54,6 +54,10 @@
|
|||||||
oncommandupdate="&events;.onSelectionChange(event);"/>
|
oncommandupdate="&events;.onSelectionChange(event);"/>
|
||||||
</window>
|
</window>
|
||||||
|
|
||||||
|
<deck id="tab-view-deck">
|
||||||
|
<vbox id="dactyl-deck-bell" dactyl:highlight="Bell"/>
|
||||||
|
</deck>
|
||||||
|
|
||||||
<vbox id="&dactyl.commandContainer;">
|
<vbox id="&dactyl.commandContainer;">
|
||||||
|
|
||||||
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
||||||
|
|||||||
Reference in New Issue
Block a user