summaryrefslogtreecommitdiff
path: root/src/manage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/manage.c')
-rw-r--r--src/manage.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/manage.c b/src/manage.c
index 7d14fc9..de1e358 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -436,6 +436,16 @@ maximize_transient (rp_window *win)
maxy = win->height;
}
+ /* Fit the window inside its frame (if it has one) */
+ if (frame)
+ {
+ PRINT_DEBUG ("frame width=%d height=%d\n",
+ frame->width, frame->height);
+
+ if (maxx > frame->width) maxx = frame->width - win->border * 2;
+ if (maxy > frame->height) maxy = frame->height - win->border * 2;
+ }
+
/* Make sure we maximize to the nearest Resize Increment specified
by the window */
if (win->hints->flags & PResizeInc)