This works well until we try to SendMessage from our proxy window to Firefox
windows. SendMessage crashes when sending to a Firefox window with our hook
registered, or to *any* window (tested on our proxy window and arbitrary
launched programs).
* 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.
* cleaning
The icon gets created but GetLastError always returns
ERROR_INVALID_WINDOW_HANDLE, at least under win7.
We should be fine with callbacks' ABI as they are defined outside ctypes-utils.
Does nothing particular, except get few informations from the registeredwindow.
ctypes-utils.jsm needs to be ironed out (ABI used for .so version and lib type
for .dll), and we'll probably have problems when declaring callbacks
(ctypes.stdcall_abi on 32bits ?).
* 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...