summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-12-18 11:14:50 +0000
committersabetts <sabetts>2001-12-18 11:14:50 +0000
commit4778220bdc44d0f75171f85730c78ffa69bff27a (patch)
tree5f753bc23d278aab323dd9e52bed383db766108e /src
parent3eb8a4e3251386c676c3d0696dc20837e9f58010 (diff)
downloadratpoison-4778220bdc44d0f75171f85730c78ffa69bff27a.zip
(maximize_transient): Fit the transient window
inside its frame.
Diffstat (limited to 'src')
-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)