1
0
mirror of https://github.com/moparisthebest/FireTray synced 2024-12-22 13:58:48 -05:00

radical attempt to fix iconify-after-show trap

This commit is contained in:
foudfou 2012-08-20 16:07:46 +02:00
parent 83a11def65
commit 525fdd96dd
3 changed files with 14 additions and 11 deletions

View File

@ -91,6 +91,12 @@ var firetrayUIOptions = {
F.LOG("hides_on_close="+hides_on_close+", hides_on_minimize="+hides_on_minimize);
document.getElementById('ui_hides_single_window').disabled =
!(hides_on_close || hides_on_minimize);
let showActivates = document.getElementById('ui_show_activates');
if (hides_on_minimize)
showActivates.checked = showActivates.disabled = hides_on_minimize;
else
showActivates.disabled = hides_on_minimize;
},
updateScrollOptions: function() {

View File

@ -8,7 +8,7 @@ pref("extensions.firetray.hides_on_close", true);
pref("extensions.firetray.hides_on_minimize", true);
pref("extensions.firetray.hides_single_window", true);
pref("extensions.firetray.start_hidden", false);
pref("extensions.firetray.show_activates", false);
pref("extensions.firetray.show_activates", true);
pref("extensions.firetray.remember_desktop", false);
pref("extensions.firetray.app_icon_type", 0);

View File

@ -232,18 +232,15 @@ firetray.Window = {
// after show
firetray.Window.restoreDesktop(xid);
if (firetray.Utils.prefService.getBoolPref('show_activates'))
if (firetray.Utils.prefService.getBoolPref('show_activates') ||
/* hides_on_minimize is tricky: first we don't restore the window
minimized if hides_on_minimize is set, which is better than not
storing the minimized state at saveStates() (in case hides_on_minimize
is changed in between). But when restoring, we need to prevent the wm
to iconify the window, and we need to do it at a late stage */
firetray.Utils.prefService.getBoolPref('hides_on_minimize'))
firetray.Window.activate(xid);
/* hides_on_minimize is tricky: first we don't store the hidden/minimized
state when saveStates(). But when restoring, we need to prevent the wm to
iconify the window, and we need to do it at a late stage */
if (firetray.Utils.prefService.getBoolPref('hides_on_minimize')) {
gdk.gdk_window_show_unraised(firetray.Handler.gdkWindows.get(xid)); // XMapWindow()
// gdk.gdk_window_deiconify(firetray.Handler.gdkWindows.get(xid));
F.LOG("deiconified");
}
firetray.PopupMenu.hideWindowItemAndSeparatorMaybe(xid);
firetray.Handler.showHideIcon();
},