diff options
author | sabetts <sabetts> | 2000-12-09 23:43:32 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2000-12-09 23:43:32 +0000 |
commit | 6eb8f2a4f20a82a719fec33ecf29d7382794c796 (patch) | |
tree | 12c844bc3a80da5826029c84342594d2c34d663c /src/actions.c | |
parent | 3068ac85a5716aff7b3ff0652220c9504b3c00b1 (diff) | |
download | ratpoison-6eb8f2a4f20a82a719fec33ecf29d7382794c796.zip |
* data.h (struct rp_window): added x, y, width, height, border;
* events.c (configure_request): Now honours request, but then
maximizes it afterwards.
(configure_request): updates the rp_window's geometry fields
* manage.c (manage): commented out XMoveResizeWindow call
(send_configure): added
* actions.h (maximize): added prototype
* actions.c (maximize): added
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c index 095604b..5bb0964 100644 --- a/src/actions.c +++ b/src/actions.c @@ -31,6 +31,7 @@ rp_action key_actions[] = { {KEY_PREFIX, 0, 0, generate_prefix}, {XK_7, -1, 0, goto_window_7}, {XK_8, -1, 0, goto_window_8}, {XK_9, -1, 0, goto_window_9}, + {XK_m, -1, 0, maximize}, { 0, 0, 0, 0 } }; void @@ -327,3 +328,20 @@ generate_prefix (void *data) XSendEvent (dpy, rp_current_window->w, False, KeyPressMask, &ev); XSync (dpy, False); } + +/* Maximize the current window if data = 0, otherwise assume it is a + pointer to a window that should be maximized */ +void +maximize (void *data) +{ + rp_window *win = (rp_window *)data; + + if (!win) win = rp_current_window; + if (!win) return; + + XMoveResizeWindow (dpy, win->w, + PADDING_LEFT, + PADDING_TOP, + win->scr->root_attr.width - PADDING_LEFT - PADDING_RIGHT, + win->scr->root_attr.height - PADDING_TOP - PADDING_BOTTOM); +} |