[Pkg-mozext-commits] [firetray] 277/399: radical attempt to fix iconify-after-show trap

David Prévot taffit at alioth.debian.org
Tue Oct 29 18:23:58 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch dfsg-clean
in repository firetray.

commit 525fdd96dd6a32f9827a9f5023cc73f7ad7682a8
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Mon Aug 20 16:07:46 2012 +0200

    radical attempt to fix iconify-after-show trap
---
 src/chrome/content/options.js        |    6 ++++++
 src/defaults/preferences/prefs.js    |    2 +-
 src/modules/linux/FiretrayWindow.jsm |   17 +++++++----------
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/src/chrome/content/options.js b/src/chrome/content/options.js
index 96402cd..71b80ed 100644
--- a/src/chrome/content/options.js
+++ b/src/chrome/content/options.js
@@ -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() {
diff --git a/src/defaults/preferences/prefs.js b/src/defaults/preferences/prefs.js
index e02085b..065e356 100644
--- a/src/defaults/preferences/prefs.js
+++ b/src/defaults/preferences/prefs.js
@@ -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);
diff --git a/src/modules/linux/FiretrayWindow.jsm b/src/modules/linux/FiretrayWindow.jsm
index d8a71d9..cabc832 100644
--- a/src/modules/linux/FiretrayWindow.jsm
+++ b/src/modules/linux/FiretrayWindow.jsm
@@ -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();
   },

-- 
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