diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-08-05 10:31:20 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-08-05 10:31:20 +0000 |
| commit | 2494762dbf89e0ea8eb72c460c6f7281fa0a2204 (patch) | |
| tree | ac1b917249f017201b28e96f685e1cb7dc9c99f7 /openbox/client.c | |
| parent | 853d5f4b70ccc475ae25806a6683406119236b29 (diff) | |
a couple frame layout bugfixes hidden inside all this.. wee
fixes for maximizing windows:
- when you toggledecor, it will reconfigure once, but the new constraints from the decor changes would not be in effect when the window was resized to the contranits. fixed by calling frame_adjust_area first thing ni client_configure_fulll with fake=TRUE which will recalc all the frame geometry without resizing/redrawing anything in the frame. this way the decor can take effect in the geometries.
- when maxed horizontally, make the client fill the screen, but dont do this by just making it wider than the screen, fit it to the screen and adjust the titlebar/handle as appropriate to keep it all on the screen.
- when maxed horizontally and vertically, remove the handle from the decorations
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/openbox/client.c b/openbox/client.c index ebff0bae..685545a6 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1712,6 +1712,11 @@ void client_configure_full(ObClient *self, ObCorner anchor, { gboolean moved = FALSE, resized = FALSE; + /* make the frame recalculate its dimentions n shit without changing + anything visible for real, this way the constraints below can work with + the updated frame dimensions. */ + frame_adjust_area(self->frame, TRUE, TRUE, TRUE); + /* gets the frame's position */ frame_client_gravity(self->frame, &x, &y); @@ -1757,8 +1762,8 @@ void client_configure_full(ObClient *self, ObCorner anchor, /* set the size and position if maximized */ if (self->max_horz) { - x = a->x - self->frame->size.left; - w = a->width; + x = a->x; + w = a->width - self->frame->size.left - self->frame->size.right; } if (self->max_vert) { y = a->y; @@ -1900,7 +1905,7 @@ void client_configure_full(ObClient *self, ObCorner anchor, moved = resized = TRUE; if (moved || resized) - frame_adjust_area(self->frame, moved, resized); + frame_adjust_area(self->frame, moved, resized, FALSE); if (!resized && (force_reply || ((!user && moved) || (user && final)))) { @@ -2170,7 +2175,7 @@ void client_shade(ObClient *self, gboolean shade) self->shaded = shade; client_change_state(self); /* resize the frame to just the titlebar */ - frame_adjust_area(self->frame, FALSE, FALSE); + frame_adjust_area(self->frame, FALSE, FALSE, FALSE); } void client_close(ObClient *self) |
