* explicit removeEventListener('close') in overlay.js
Them titlebar is preventing fake close/minimize buttons to fire needed events
(close, WM_SYSCOMMAND). So, until Bug 827880 is fixed, hides_on_minimize
doesn't work with the menubar hidden.
* attempt to set our WndProc on Moz windows
* store window Id as a string
Calling CallWindowProc or ctypes.FuncType from a WNDPROC added to a Firefox
window crashes. See
https://bugzilla.mozilla.org/show_bug.cgi?id=598679https://bugzilla.mozilla.org/show_bug.cgi?id=671266
The problem does not seem to occur on non-Firefox windows (for ex. a a hidden
window that we created).
We'll try to test Hooks instead of WndProcs.
* startupHide cleaning
It looks like setting baseWin.visibility=false removes the possibility to
restore the app by calling it from the command line. This is why we use
setVisibility() instead if start_hidden.
actually mapped (or "mapped" to another desktop)
* check app started if -firetrayShowHide or -firetrayPresent
We can't base the app-started event solely on MapNotify, at least because the
app could be started on another desktop (not mapped). The app-started event in
Thunderbird is not based on mail-startup-done events. We might have to consider
implementing a watchdog for unexpected cases...
thread.processNextEvent() is prohibited in Firefox (though used in
mozmill/util.js). Nested timers are a bit twisted and ugly. Need to check
|yield| and generators: http://unixpapa.com/js/sleep.html, dactyl/base.jsm
(K. Maglione)
Unfortunately there is not equivalent "sessionstore-windows-restored" in TB
yet. Many events related to windows are issued before windows are fully
realized. "mail-startup-done"/"mail-tabs-session-restored" are issued by *each*
window. "console-api-log-event" is not reliable and can be issued at relatively
early stage on heavy configs. So that the best solution is probably to count
restored windows ourselves...
base startup event on "sessionstore-windows-restored" and
"console-api-log-event", instead of the first "before-first-paint", reverting
some of 29de64e5
No 'new-directed-incoming-message' event is issued on new messages for twitter
accounts, which seem to be considered chatrooms (instead of private
conversations).
* when start_hidden, hide window on first x11.MapNotify instead of hiding all
windows short after the "startup event".
This prevents having visibility falsely corrected for windows that are
displayed after the "startup event", and thus having to click twice on the
tray icon to actually restore windows.