[Pkg-mozext-commits] [firetray] 225/399: attempt to catch minimize event that would be issued in Ubuntu 11.10
David Prévot
taffit at alioth.debian.org
Tue Oct 29 18:23:48 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 b2f270687dc55ddc284ad73cdac9e1625fbb7ee7
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Tue Apr 10 22:42:06 2012 +0200
attempt to catch minimize event that would be issued in Ubuntu 11.10
---
src/modules/ctypes/linux/x11.jsm | 40 +++++++++++++++++++++++++++++-----
src/modules/linux/FiretrayWindow.jsm | 23 ++++++++++++++-----
2 files changed, 53 insertions(+), 10 deletions(-)
diff --git a/src/modules/ctypes/linux/x11.jsm b/src/modules/ctypes/linux/x11.jsm
index 1e1c95b..2962c92 100644
--- a/src/modules/ctypes/linux/x11.jsm
+++ b/src/modules/ctypes/linux/x11.jsm
@@ -74,11 +74,41 @@ function x11_defines(lib) {
this.PropModePrepend = 1;
this.PropModeAppend = 2;
// Event names
- this.DestroyNotify = 17;
- this.UnmapNotify = 18;
- this.MapNotify = 19;
- this.PropertyNotify = 28;
- this.ClientMessage = 33;
+ this.KeyPress = 2;
+ this.KeyRelease = 3;
+ this.ButtonPress = 4;
+ this.ButtonRelease = 5;
+ this.MotionNotify = 6;
+ this.EnterNotify = 7;
+ this.LeaveNotify = 8;
+ this.FocusIn = 9;
+ this.FocusOut = 10;
+ this.KeymapNotify = 11;
+ this.Expose = 12;
+ this.GraphicsExpose = 13;
+ this.NoExpose = 14;
+ this.VisibilityNotify = 15;
+ this.CreateNotify = 16;
+ this.DestroyNotify = 17;
+ this.UnmapNotify = 18;
+ this.MapNotify = 19;
+ this.MapRequest = 20;
+ this.ReparentNotify = 21;
+ this.ConfigureNotify = 22;
+ this.ConfigureRequest = 23;
+ this.GravityNotify = 24;
+ this.ResizeRequest = 25;
+ this.CirculateNotify = 26;
+ this.CirculateRequest = 27;
+ this.PropertyNotify = 28;
+ this.SelectionClear = 29;
+ this.SelectionRequest = 30;
+ this.SelectionNotify = 31;
+ this.ColormapNotify = 32;
+ this.ClientMessage = 33;
+ this.MappingNotify = 34;
+ this.GenericEvent = 35;
+ this.LASTEvent = 36; /* must be bigger than any event # */
// Xutils.h: definitions for initial window state
this.WithdrawnState = 0; /* for windows that are not mapped */
this.NormalState = 1; /* most applications want to start this way */
diff --git a/src/modules/linux/FiretrayWindow.jsm b/src/modules/linux/FiretrayWindow.jsm
index aed2507..eb4ef69 100644
--- a/src/modules/linux/FiretrayWindow.jsm
+++ b/src/modules/linux/FiretrayWindow.jsm
@@ -472,12 +472,13 @@ firetray.Window = {
let xany = ctypes.cast(xev, x11.XAnyEvent.ptr);
let xwin = xany.contents.window;
+ let winStates, isHidden;
switch (xany.contents.type) {
case x11.UnmapNotify:
F.LOG("UnmapNotify");
- let winStates = firetray.Window.getXWindowStates(xwin);
- let isHidden = winStates & FIRETRAY_XWINDOW_HIDDEN;
+ winStates = firetray.Window.getXWindowStates(xwin);
+ isHidden = winStates & FIRETRAY_XWINDOW_HIDDEN;
F.LOG("winStates="+winStates+", isHidden="+isHidden);
if (isHidden) {
let hides_on_minimize = firetray.Utils.prefService.getBoolPref('hides_on_minimize');
@@ -486,15 +487,27 @@ firetray.Window = {
if (hides_single_window) {
firetray.Handler.hideSingleWindow(xwin);
} else
- firetray.Handler.hideAllWindows();
+ firetray.Handler.hideAllWindows();
}
}
break;
- default:
- // F.LOG("xany.type="+xany.contents.type);
+ case x11.PropertyNotify:
+ let xprop = ctypes.cast(xev, x11.XPropertyEvent.ptr);
+ if (firetray.js.strEquals(xprop.contents.atom, x11.current.Atoms.WM_STATE) &&
+ firetray.js.strEquals(xprop.contents.state, x11.PropertyNewValue)) {
+ F.LOG("PropertyNotify: "+xprop.contents.atom+" send_event: "+xprop.contents.send_event+" state: "+xprop.contents.state);
+ winStates = firetray.Window.getXWindowStates(xwin);
+ isHidden = winStates & FIRETRAY_XWINDOW_HIDDEN;
+ if (isHidden) F.WARN("*** HIDDEN ***");
+ }
break;
+
+ // default:
+ // F.LOG("xany.type="+xany.contents.type);
+ // break;
}
+
} catch(x) {
F.ERROR(x);
}
--
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