I finally figure out what was missing for xprop/gtk to work. I don't
understand it, but nevertheless you'll get the patch.
Its all about respecting the feelings of the windows while managing them ;)
< uriel> | "WithdrawnState"? WTF does that mean? that it is an
autistic application?
< uriel> | soon on top of window managers we will have to write
psychologist AIs to trat our windows mental problems
< uriel> | "How does it make you feel being unmapped?"
Regards
wabu
diff -r a0ec41cbf965 client.c
--- a/client.c Mon Jan 22 12:00:12 2007 +0100
+++ b/client.c Sun Jan 28 13:01:15 2007 +0100
@@ -114,6 +114,14 @@ create_client(Window w, XWindowAttribute
}
void
+set_client_state(Client * c, int state)
+{
+ long data[] = { state, None };
+ XChangeProperty(blz.dpy, c->win, wm_atom[WMState], wm_atom[WMState], 32,
+ PropModeReplace, (unsigned char *) data, 2);
+}
+
+void
update_client_grab(Client *c, Bool is_sel) {
if(is_sel) {
ungrab_mouse(c->framewin, AnyModifier, AnyButton);
@@ -176,7 +184,8 @@ map_client(Client *c) {
map_client(Client *c) {
XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
XMapWindow(blz.dpy, c->win);
- XSelectInput(blz.dpy, c->win, CLIENT_MASK);
+ XSelectInput(blz.dpy, c->win, CLIENT_MASK);
+ set_client_state(c, NormalState);
}
void
@@ -184,6 +193,7 @@ unmap_client(Client *c) {
XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
XUnmapWindow(blz.dpy, c->win);
XSelectInput(blz.dpy, c->win, CLIENT_MASK);
+ set_client_state(c, WithdrawnState);
}
void
diff -r a0ec41cbf965 main.c
--- a/main.c Mon Jan 22 12:00:12 2007 +0100
+++ b/main.c Sun Jan 28 13:02:25 2007 +0100
@@ -91,6 +91,7 @@ win_proto(Window w) {
static void
init_atoms() {
+ wm_atom[WMState] = XInternAtom(blz.dpy, "WM_STATE", False);
wm_atom[WMProtocols] = XInternAtom(blz.dpy, "WM_PROTOCOLS", False);
wm_atom[WMDelete] = XInternAtom(blz.dpy, "WM_DELETE_WINDOW", False);
net_atom[NetSupported] = XInternAtom(blz.dpy, "_NET_SUPPORTED", False);
diff -r a0ec41cbf965 wmii.h
--- a/wmii.h Mon Jan 22 12:00:12 2007 +0100
+++ b/wmii.h Sun Jan 28 13:01:41 2007 +0100
@@ -67,7 +67,7 @@ struct BlitzBrush {
};
/* WM atoms */
-enum { WMProtocols, WMDelete, WMLast };
+enum { WMState, WMProtocols, WMDelete, WMLast };
/* NET atoms */
enum { NetSupported, NetWMName, NetLast };
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:20:04 UTC