Don't fallback on FindWindow() when loading the default icon (winnt).

The minimal supported platformVersion for winnt is 27.0 where nativeHandle is
provided.
This commit is contained in:
foudfou 2014-06-05 12:14:08 +02:00
parent 659ca4bb80
commit e4419c47f7
1 changed files with 1 additions and 5 deletions

View File

@ -87,11 +87,7 @@ firetray.StatusIcon = {
loadImages: function() {
let topmost = firetray.Handler.getWindowInterface(
Services.wm.getMostRecentWindow(null), "nsIBaseWindow");
let hwnd;
if (topmost.nativeHandle)
hwnd = firetray.Win32.hexStrToHwnd(topmost.nativeHandle);
else
hwnd = user32.FindWindowW("MozillaHiddenWindowClass", null);
let hwnd = firetray.Win32.hexStrToHwnd(topmost.nativeHandle);
log.debug("topmost or hiddenWin hwnd="+hwnd);
this.icons.insert('app', this.getIconFromWindow(hwnd));
['app_icon_custom', 'mail_icon_custom'].forEach(function(elt) {