summaryrefslogtreecommitdiff
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
parent3eb8a4e3251386c676c3d0696dc20837e9f58010 (diff)
downloadratpoison-4778220bdc44d0f75171f85730c78ffa69bff27a.zip
(maximize_transient): Fit the transient window
inside its frame.
-rw-r--r--ChangeLog5
-rw-r--r--src/manage.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index baa43e2..530d5d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-18 shawn <sabetts@vcn.bc.ca>
+
+ * src/manage.c (maximize_transient): Fit the transient window
+ inside its frame.
+
2001-12-11 John Betts <hotpulp@netidea.com>
* src/actions.c (parse_keydesc): Don't mangle the key description
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)