1
0
mirror of https://github.com/moparisthebest/FireTray synced 2024-11-11 03:25:07 -05:00

fix window unregistration

This commit is contained in:
foudfou 2014-02-22 23:19:19 +01:00
parent cee5d24e71
commit 6d4c0040f7
2 changed files with 3 additions and 2 deletions

View File

@ -297,7 +297,7 @@ firetray.js = {
assert: function(condition, message) {
if (!condition) {
throw message || "Assertion failed";
throw new Error(message || "Assertion failed");
}
},

View File

@ -107,7 +107,7 @@ firetray.Window.detachWndProc = function(wid) {
user32.SetWindowLongW(hwnd, user32.GWLP_WNDPROC,
ctypes.cast(procPrev, win32.LONG_PTR))
);
firetray.js.assert(proc == firetray.Handler.wndProcs.get(wid),
firetray.js.assert(firetray.js.strEquals(proc, firetray.Handler.wndProcs.get(wid)),
"Wrong WndProc replaced.");
firetray.Handler.wndProcs.remove(wid);
firetray.Handler.wndProcsOrig.remove(wid);
@ -173,6 +173,7 @@ firetray.Handler.unregisterWindow = function(win) {
if (!delete firetray.Handler.windows[wid])
throw new DeleteError();
firetray.Handler.dumpWindows();
log.debug("window "+wid+" unregistered");
return true;
};