[Pkg-mozext-commits] [firetray] 337/399: yet another attempt to fix restore maximized window. This is tricky because it can break restore minimized (hides_on_minimize off)
David Prévot
taffit at alioth.debian.org
Tue Oct 29 18:24:09 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 d77724d46b57cef3f3ab8d803b10b71d0505081b
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Wed Jan 16 23:48:25 2013 +0100
yet another attempt to fix restore maximized window. This is tricky because it
can break restore minimized (hides_on_minimize off)
---
src/modules/linux/FiretrayWindow.jsm | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/modules/linux/FiretrayWindow.jsm b/src/modules/linux/FiretrayWindow.jsm
index 98f40d6..09f435f 100644
--- a/src/modules/linux/FiretrayWindow.jsm
+++ b/src/modules/linux/FiretrayWindow.jsm
@@ -290,10 +290,17 @@ firetray.Window = {
log.debug("save: windowStates="+winStates);
},
+ // NOTE: fluxbox bug probably: if hidden and restored iconified, then
+ // switching to desktop de-iconifies it ?!
restoreStates: function(xid) {
let winStates = firetray.Handler.windows[xid].savedStates;
log.debug("restored WindowStates: " + winStates);
+ if (winStates & FIRETRAY_XWINDOW_HIDDEN) {
+ firetray.Handler.windows[xid].chromeWin.minimize();
+ log.debug("restored minimized");
+ }
+
/* helps prevent getting iconify event following show() */
if (firetray.Utils.prefService.getBoolPref('hides_on_minimize'))
firetray.Handler.windows[xid].chromeWin.restore(); // nsIDOMChromeWindow.idl
@@ -303,11 +310,6 @@ firetray.Window = {
log.debug("restored maximized");
}
- if (winStates & FIRETRAY_XWINDOW_HIDDEN) {
- firetray.Handler.windows[xid].chromeWin.minimize();
- log.debug("restored minimized");
- }
-
delete firetray.Handler.windows[xid].savedStates;
},
@@ -522,6 +524,8 @@ firetray.Window = {
case x11.MapNotify:
log.debug("MapNotify");
+ let gdkWinStateOnMap = gdk.gdk_window_get_state(firetray.Handler.gdkWindows.get(xid));
+ log.debug("gdkWinState="+gdkWinStateOnMap+" for xid="+xid);
let win = firetray.Handler.windows[xid];
if (!win.visible && firetray.Handler.appStarted) { // happens when hidden app called from command line
log.warn("window not visible, correcting visibility");
@@ -531,10 +535,11 @@ firetray.Window = {
break;
case x11.UnmapNotify: // for catching 'iconify'
- let gdkWinState = gdk.gdk_window_get_state(firetray.Handler.gdkWindows.get(xid));
- log.debug("gdkWinState="+gdkWinState+" for xid="+xid);
+ log.debug("UnmapNotify");
+ let gdkWinStateOnUnmap = gdk.gdk_window_get_state(firetray.Handler.gdkWindows.get(xid));
+ log.debug("gdkWinStateOnUnmap="+gdkWinStateOnUnmap+" for xid="+xid);
// NOTE: Gecko 8.0 provides the 'sizemodechange' event
- if (gdkWinState === gdk.GDK_WINDOW_STATE_ICONIFIED) {
+ if (gdkWinStateOnUnmap & gdk.GDK_WINDOW_STATE_ICONIFIED) {
log.debug("GOT ICONIFIED");
let hides_on_minimize = firetray.Utils.prefService.getBoolPref('hides_on_minimize');
let hides_single_window = firetray.Utils.prefService.getBoolPref('hides_single_window');
--
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