summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-09-24 17:17:51 +0000
committerDana Jansens <danakj@orodu.net>2003-09-24 17:17:51 +0000
commit624033c32de25c684d015386fb2d3ae41e36bbb0 (patch)
treeae5e2be2d997d56ce877eac114e1845d3a0bac8b
parent847a3ef09a72f087269dcb0131db61c7d0f7a117 (diff)
support the _KDE_WM_CHANGE_STATE hint
-rw-r--r--openbox/client.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 209e5397..4a553224 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -2071,7 +2071,14 @@ static void client_iconify_recursive(ObClient *self,
if (iconic) {
if (self->functions & OB_CLIENT_FUNC_ICONIFY) {
+ long old;
+
+ old = self->wmstate;
self->wmstate = IconicState;
+ if (old != self->wmstate)
+ PROP_MSG(self->window, kde_wm_change_state,
+ self->wmstate, 1, 0, 0);
+
self->ignore_unmaps++;
/* we unmap the client itself so that we can get MapRequest
events, and because the ICCCM tells us to! */
@@ -2085,9 +2092,17 @@ static void client_iconify_recursive(ObClient *self,
changed = TRUE;
}
} else {
+ long old;
+
if (curdesk)
client_set_desktop(self, screen_desktop, FALSE);
+
+ old = self->wmstate;
self->wmstate = self->shaded ? IconicState : NormalState;
+ if (old != self->wmstate)
+ PROP_MSG(self->window, kde_wm_change_state,
+ self->wmstate, 1, 0, 0);
+
XMapWindow(ob_display, self->window);
/* this puts it after the current focused window */
@@ -2236,8 +2251,16 @@ void client_shade(ObClient *self, gboolean shade)
self->shaded == shade) return; /* already done */
/* when we're iconic, don't change the wmstate */
- if (!self->iconic)
- self->wmstate = shade ? IconicState : NormalState;
+ if (!self->iconic) {
+ long old;
+
+ old = self->wmstate;
+ self->wmstate = shade ? IconicState : NormalState;
+ if (old != self->wmstate)
+ PROP_MSG(self->window, kde_wm_change_state,
+ self->wmstate, 1, 0, 0);
+ }
+
self->shaded = shade;
client_change_state(self);
/* resize the frame to just the titlebar */