diff options
author | sabetts <sabetts> | 2001-02-27 03:26:57 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-02-27 03:26:57 +0000 |
commit | d81f46e77d6f6c0ce351765a1a778cdad9be592a (patch) | |
tree | fb7df498de91964d37a5910b5e8e06bd4473bdab /src/actions.c | |
parent | fb2284fca35a68078175bf427c644fcb81bd6d46 (diff) | |
download | ratpoison-d81f46e77d6f6c0ce351765a1a778cdad9be592a.zip |
* actions.h: prototype for force_maximize added
* actions.c: the user command "maximize" calls force_maximize
(force_maximize): New function
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/actions.c b/src/actions.c index 10779d4..40ea996 100644 --- a/src/actions.c +++ b/src/actions.c @@ -145,7 +145,7 @@ user_command user_commands[] = {"windows", cmd_windows, arg_VOID}, {"title", cmd_rename, arg_STRING}, {"clock", cmd_clock, arg_VOID}, - {"maximize", maximize, arg_VOID}, + {"maximize", force_maximize, arg_VOID}, {"newwm", cmd_newwm, arg_STRING}, {"generate", cmd_generate, arg_STRING}, /* rename to stuff */ {"version", cmd_version, arg_VOID}, @@ -728,7 +728,8 @@ maximize_transient (rp_window *win) win->height = maxy; } -/* set a good standard window's x,y,width,height fields to maximize the window. */ +/* set a good standard window's x,y,width,height fields to maximize + the window. */ static void maximize_normal (rp_window *win) { @@ -806,3 +807,22 @@ maximize (void *data) XSync (dpy, False); } + +/* Maximize the current window but don't treat transient windows + differently. */ +void +force_maximize (void *data) +{ + rp_window *win = (rp_window *)data; + + if (!win) win = rp_current_window; + if (!win) return; + + maximize_normal(win); + + /* Actually do the maximizing */ + XMoveResizeWindow (dpy, win->w, win->x, win->y, win->width+1, win->height+1); + XMoveResizeWindow (dpy, win->w, win->x, win->y, win->width, win->height); + + XSync (dpy, False); +} |