diff --git a/src/chrome/content/overlay.js b/src/chrome/content/overlay.js index 216e569..ef0d805 100644 --- a/src/chrome/content/overlay.js +++ b/src/chrome/content/overlay.js @@ -41,7 +41,6 @@ var firetrayChrome = { // each new window gets a new firetrayChrome ! firetray_log.debug('Firetray UNLOADED !'); }, - // BUG: CLOSE not emitted on TB (24, 27) win32 (XP, 7) ?! /* until we find a fix (TODO), we need to set browser.tabs.warnOnClose=false to prevent the popup when closing a window with multiple tabs and when hides_on_close is set (we are not actually closing the tabs!). There is no diff --git a/src/modules/ctypes/winnt/win32.jsm b/src/modules/ctypes/winnt/win32.jsm index 4a0610e..38cb97b 100644 --- a/src/modules/ctypes/winnt/win32.jsm +++ b/src/modules/ctypes/winnt/win32.jsm @@ -81,28 +81,56 @@ var win32 = new function() { this.ERROR_RESOURCE_TYPE_NOT_FOUND = 1813; // WinUser.h - this.WM_USER = 0x0400; - this.WM_APP = 0x8000; + this.WM_NULL = 0x0000; + this.WM_CREATE = 0x0001; + this.WM_DESTROY = 0x0002; + this.WM_MOVE = 0x0003; + this.WM_SIZE = 0x0005; + this.WM_ACTIVATE = 0x0006; + this.WA_INACTIVE = 0; + this.WA_ACTIVE = 1; + this.WA_CLICKACTIVE = 2; + this.WM_SETFOCUS = 0x0007; + this.WM_KILLFOCUS = 0x0008; + this.WM_ENABLE = 0x000A; + this.WM_SETREDRAW = 0x000B; + this.WM_SETTEXT = 0x000C; + this.WM_GETTEXT = 0x000D; + this.WM_GETTEXTLENGTH = 0x000E; + this.WM_PAINT = 0x000F; + this.WM_CLOSE = 0x0010; + this.WM_QUIT = 0x0012; + this.WM_ERASEBKGND = 0x0014; + this.WM_SYSCOLORCHANGE = 0x0015; + this.WM_SHOWWINDOW = 0x0018; + this.WM_WININICHANGE = 0x001A; + this.WM_SETTINGCHANGE = this.WM_WININICHANGE; + this.WM_HSCROLL = 0x0114; + this.WM_VSCROLL = 0x0115; + this.WM_MOUSEWHEEL = 0x020A; - this.WM_CONTEXTMENU = 0x007B; + this.WM_USER = 0x0400; + this.WM_APP = 0x8000; - this.WM_MOUSEFIRST = 0x0200; - this.WM_MOUSEMOVE = 0x0200; - this.WM_LBUTTONDOWN = 0x0201; - this.WM_LBUTTONUP = 0x0202; - this.WM_LBUTTONDBLCLK = 0x0203; - this.WM_RBUTTONDOWN = 0x0204; - this.WM_RBUTTONUP = 0x0205; - this.WM_RBUTTONDBLCLK = 0x0206; - this.WM_MBUTTONDOWN = 0x0207; - this.WM_MBUTTONUP = 0x0208; - this.WM_MBUTTONDBLCLK = 0x0209; - this.WM_MOUSEWHEEL = 0x020A; - this.WM_XBUTTONDOWN = 0x020B; - this.WM_XBUTTONUP = 0x020C; - this.WM_XBUTTONDBLCLK = 0x020D; - this.WM_MOUSELAST = 0x020D; - this.WM_MOUSELAST = 0x020A; + this.WM_CONTEXTMENU = 0x007B; + + this.WM_MOUSEFIRST = 0x0200; + this.WM_MOUSEMOVE = 0x0200; + this.WM_LBUTTONDOWN = 0x0201; + this.WM_LBUTTONUP = 0x0202; + this.WM_LBUTTONDBLCLK = 0x0203; + this.WM_RBUTTONDOWN = 0x0204; + this.WM_RBUTTONUP = 0x0205; + this.WM_RBUTTONDBLCLK = 0x0206; + this.WM_MBUTTONDOWN = 0x0207; + this.WM_MBUTTONUP = 0x0208; + this.WM_MBUTTONDBLCLK = 0x0209; + this.WM_MOUSEWHEEL = 0x020A; + this.WM_XBUTTONDOWN = 0x020B; + this.WM_XBUTTONUP = 0x020C; + this.WM_XBUTTONDBLCLK = 0x020D; + this.WM_MOUSELAST = 0x020D; + this.WM_MOUSELAST = 0x020A; this.BITMAP = ctypes.StructType("BITMAP", [ { "bmType": this.LONG }, diff --git a/src/modules/winnt/FiretrayWindow.jsm b/src/modules/winnt/FiretrayWindow.jsm index 9b5a138..c7773af 100644 --- a/src/modules/winnt/FiretrayWindow.jsm +++ b/src/modules/winnt/FiretrayWindow.jsm @@ -55,6 +55,7 @@ firetray.Window.setVisibility = function(wid, visible) { firetray.Window.wndProc = function(hWnd, uMsg, wParam, lParam) { // filterWindow // log.debug("wndProc CALLED: hWnd="+hWnd+", uMsg="+uMsg+", wParam="+wParam+", lParam="+lParam); + let wid = firetray.Win32.hwndToHexStr(hWnd); if (uMsg === firetray.Win32.WM_TRAYMESSAGE) { log.debug("wndProc CALLED with WM_TRAYMESSAGE"); @@ -64,9 +65,20 @@ firetray.Window.wndProc = function(hWnd, uMsg, wParam, lParam) { // filterWindow } else if (uMsg === win32.WM_USER) { log.debug("wndProc CALLED with WM_USER"); + + } else if (uMsg === win32.WM_CLOSE) { + log.debug("wndProc CALLED with WM_CLOSE"); + + } else if (uMsg === win32.WM_DESTROY) { + log.debug("wndProc CALLED with WM_DESTROY "+wid); + + } else if (uMsg === win32.WM_MOVE) { + log.debug("wndProc CALLED with WM_MOVE "+wid); + + } else if (uMsg === win32.WM_ACTIVATE) { + log.debug("wndProc CALLED with WM_ACTIVATE "+wid); } - let wid = firetray.Win32.hwndToHexStr(hWnd); let procPrev = firetray.Handler.wndProcsOrig.get(wid); return user32.CallWindowProcW(procPrev, hWnd, uMsg, wParam, lParam); };