[Pkg-mozext-commits] [firetray] 73/84: Don't fallback to FindWindow() when registering a window (winnt).
David Prévot
taffit at moszumanska.debian.org
Sun Jul 20 01:42:47 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firetray.
commit 93cabd4fa0676d8b0ddd5e4fb8b466dbbff0ff87
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Thu Jun 5 14:48:19 2014 +0200
Don't fallback to FindWindow() when registering a window (winnt).
Gecko 27+ required for winnt. |nativeHandle| supported since 17.
---
src/modules/winnt/FiretrayWindow.jsm | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/modules/winnt/FiretrayWindow.jsm b/src/modules/winnt/FiretrayWindow.jsm
index f9fef06..17099a9 100644
--- a/src/modules/winnt/FiretrayWindow.jsm
+++ b/src/modules/winnt/FiretrayWindow.jsm
@@ -170,16 +170,12 @@ firetray.Handler.registerWindow = function(win) {
log.debug("register window");
let baseWin = firetray.Handler.getWindowInterface(win, "nsIBaseWindow");
- let nativeHandle = baseWin.nativeHandle;
- let hwnd, wid;
- if (nativeHandle) {
- hwnd = firetray.Win32.hexStrToHwnd(nativeHandle);
- wid = nativeHandle;
- }
- else {
- hwnd = user32.FindWindowW("MozillaWindowClass", win.document.title);
- wid = firetray.Win32.hwndToHexStr(hwnd);
+ let wid = baseWin.nativeHandle;
+ if (!wid) {
+ log.error("nativeHandle undefined ?!");
+ return false;
}
+ let hwnd = firetray.Win32.hexStrToHwnd(wid);
log.debug("=== hwnd="+hwnd+" wid="+wid+" win.document.title: "+win.document.title);
if (this.windows.hasOwnProperty(wid)) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git
More information about the Pkg-mozext-commits
mailing list