summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-24 20:05:11 +0000
committerDana Jansens <danakj@orodu.net>2003-03-24 20:05:11 +0000
commit7beec94a1fe6be46321a0172177136c501da9ba5 (patch)
treef525f159891b0c9c1edbfe7992ef5e2cc093b518
parent0d84c43d2a02acf5d2f0159e8cf54fe85f3755cc (diff)
make sure windows which cant be moved or resized also can't be fullscreened
-rw-r--r--openbox/client.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/openbox/client.c b/openbox/client.c
index bebd8949..4d2710ee 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -794,7 +794,7 @@ void client_setup_decor_and_functions(Client *self)
/* can't maximize without moving/resizing */
if (!((self->functions & Func_Move) && (self->functions & Func_Resize)))
- self->functions &= ~Func_Maximize;
+ self->functions &= ~(Func_Maximize | Func_Fullscreen);
/* finally, user specified disabled decorations are applied to subtract
decorations */
@@ -1307,6 +1307,18 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h,
}
}
+ /* these override the above states! if you cant move you can't move! */
+ if (user) {
+ if (!(self->functions & Func_Move)) {
+ x = self->area.x;
+ y = self->area.y;
+ }
+ if (!(self->functions & Func_Resize)) {
+ w = self->area.width;
+ h = self->area.height;
+ }
+ }
+
if (x == self->area.x && y == self->area.y && w == self->area.width &&
h == self->area.height)
return; /* no change */