1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 07:17:58 +01:00

Hopefully deal with our lost focus issues once and for all.

Update issue 131
Status: Started
This should hopefully take care of this issue.

Update issue 212
Status: Started
This should hopefully take care of this issue.

--HG--
branch : bootstrapped
This commit is contained in:
Kris Maglione
2010-12-28 16:42:55 -05:00
parent 53f9181b09
commit cc9ef60b63
2 changed files with 11 additions and 3 deletions

View File

@@ -623,10 +623,8 @@ var CommandLine = Module("commandline", {
this.widgets.message = null;
if (modes.main != modes.COMMAND_LINE)
this.widgets.command = null;
if (modes.main == modes.OUTPUT_MULTILINE && this.widgets.multilineOutput.atEnd) {
dactyl.focusContent();
if (modes.main == modes.OUTPUT_MULTILINE && this.widgets.multilineOutput.atEnd)
modes.pop();
}
if (modes.main != modes.OUTPUT_MULTILINE)
this.multilineOutputVisible = false;
},

View File

@@ -93,6 +93,7 @@ var Events = Module("events", {
this._activeMenubar = false;
this.addSessionListener(window, "DOMMenuBarActive", this.onDOMMenuBarActive, true);
this.addSessionListener(window, "DOMMenuBarInactive", this.onDOMMenuBarInactive, true);
this.addSessionListener(window, "blur", this.onBlur, true);
this.addSessionListener(window, "focus", this.onFocus, true);
this.addSessionListener(window, "keydown", this.onKeyUpOrDown, true);
this.addSessionListener(window, "keypress", this.onKeyPress, true);
@@ -724,6 +725,15 @@ var Events = Module("events", {
}
},
onBlur: function onFocus(event) {
if (event.originalTarget instanceof Window && services.focus.activeWindow == null)
// Deals with circumstances where, after the main window
// blurs while a collapsed frame has focus, re-activating
// the main window does not restore focus and we lose key
// input.
services.focus.clearFocus(window);
},
// TODO: Merge with onFocusChange
onFocus: function onFocus(event) {
let elem = event.originalTarget;