1
0
mirror of https://github.com/moparisthebest/FireTray synced 2025-01-08 12:08:05 -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() { }, loadThemedIcons: function() { },
loadImages: function() { loadImages: function() {
// the Mozilla hidden window has the default Mozilla icon let topmost = firetray.Handler.getWindowInterface(
let hwnd_hidden_moz = user32.FindWindowW("MozillaHiddenWindowClass", null); Services.wm.getMostRecentWindow(null), "nsIBaseWindow");
log.debug("=== hwnd_hidden_moz="+hwnd_hidden_moz); let hwnd = firetray.Win32.hexStrToHwnd(topmost.nativeHandle);
this.icons.insert('app', this.getIconFromWindow(hwnd_hidden_moz)); log.debug("topmost or hiddenWin hwnd="+hwnd);
this.icons.insert('app', this.getIconFromWindow(hwnd));
['app_icon_custom', 'mail_icon_custom'].forEach(function(elt) { ['app_icon_custom', 'mail_icon_custom'].forEach(function(elt) {
firetray.StatusIcon.loadImageCustom(elt); firetray.StatusIcon.loadImageCustom(elt);
}); });