diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 53106cad..0b675140 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -2069,13 +2069,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { statusline.update(); dactyl.log(_("dactyl.initialized", config.appName), 0); dactyl.initialized = true; - - util.delay(() => { - if (services.focus.activeWindow === window) - overlay.activeWindow = window; - - util.flushLateMethods(dactyl); - }); } }); diff --git a/common/content/events.js b/common/content/events.js index 9cd552b5..57729de7 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -618,9 +618,6 @@ var Events = Module("events", { util.trapErrors("addEditActionListener", DOM(elem).editor, editor); - if (elem == window) - overlay.activeWindow = window; - overlay.setData(elem, "had-focus", true); if (event.target instanceof Ci.nsIDOMXULTextBoxElement) if (Events.isHidden(elem, true)) @@ -873,6 +870,12 @@ var Events = Module("events", { autocommands.trigger("Fullscreen", { url: this._fullscreen ? "on" : "off", state: this._fullscreen }); } statusline.updateZoomLevel(); + }, + + activate: function onActivate(event) { + if (event.target === window) { + overlay.activeWindow = window; + } } },