summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-06-09 09:31:06 -0400
committerDana Jansens <danakj@orodu.net>2010-06-14 12:19:01 -0400
commit6d95e2441a1ebba1ec108860d08aceee852c6747 (patch)
tree482665e146d99b2cf9a7b8476baf113e13fe303e
parentc36b89ba12eae18d3011c8516906c21e9abb89dc (diff)
allow a user to set "undecorated" on a window without decorations
if not based on window type, the app may decide to have decorations again sometime. this was not always legal but chromium has made it so.
-rw-r--r--openbox/client.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/openbox/client.c b/openbox/client.c
index a7141373..4cba7f11 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -1723,6 +1723,13 @@ void client_setup_decor_and_functions(ObClient *self, gboolean reconfig)
break;
}
+ /* If the client has no decor from its type (which never changes) then
+ don't allow the user to "undecorate" the window. Otherwise, allow them
+ to, even if there are motif hints removing the decor, because those
+ may change these days (e.g. chromium) */
+ if (self->decorations == 0)
+ self->functions &= ~OB_CLIENT_FUNC_UNDECORATE;
+
/* Mwm Hints are applied subtractively to what has already been chosen for
decor and functionality */
if (self->mwmhints.flags & OB_MWM_FLAG_DECORATIONS) {
@@ -1782,11 +1789,6 @@ void client_setup_decor_and_functions(ObClient *self, gboolean reconfig)
self->decorations &= ~(OB_FRAME_DECOR_HANDLE | OB_FRAME_DECOR_GRIPS);
}
- /* If there are no decorations to remove, don't allow the user to try
- toggle the state */
- if (self->decorations == 0)
- self->functions &= ~OB_CLIENT_FUNC_UNDECORATE;
-
/* finally, the user can have requested no decorations, which overrides
everything (but doesnt give it a border if it doesnt have one) */
if (self->undecorated)