diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/manage.c | 10 |
2 files changed, 15 insertions, 0 deletions
@@ -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) |