1
0
mirror of https://github.com/moparisthebest/FireTray synced 2025-01-06 11:08:04 -05:00

Merge branch 'winnt_nativeHandle'

This commit is contained in:
foudfou 2014-06-05 12:21:05 +02:00
commit 354a48d2fc

View File

@ -85,10 +85,11 @@ firetray.StatusIcon = {
loadThemedIcons: function() { },
loadImages: function() {
// the Mozilla hidden window has the default Mozilla icon
let hwnd_hidden_moz = user32.FindWindowW("MozillaHiddenWindowClass", null);
log.debug("=== hwnd_hidden_moz="+hwnd_hidden_moz);
this.icons.insert('app', this.getIconFromWindow(hwnd_hidden_moz));
let topmost = firetray.Handler.getWindowInterface(
Services.wm.getMostRecentWindow(null), "nsIBaseWindow");
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) {
firetray.StatusIcon.loadImageCustom(elt);
});