diff options
author | sabetts <sabetts> | 2001-02-11 08:10:27 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-02-11 08:10:27 +0000 |
commit | 83b8ce0334def917dac3d47c21e9a6e389007bd0 (patch) | |
tree | be578b014696e83d77af4c1ebf9d8dcb26b705b1 /src/manage.c | |
parent | 69c05c373e8547e47ac523240cf9e6c9acadfc30 (diff) | |
download | ratpoison-83b8ce0334def917dac3d47c21e9a6e389007bd0.zip |
* manage.h (set_state): Added prototype
* manage.c (send_configure): Now sends the window's x,y,width,height
coordinates.
(set_state): Added
* events.c (map_request): Calls set_state when mapping an unmapped
window.
* actions.c (maximize_transient): takes an rp_window as the
argument. Removed code to handle void *data. Incremental resizing
only happens if the maximum size isn't set. Removed actual X
maximization code.
(maximize): Moved meat to maximize_normal().
Diffstat (limited to 'src/manage.c')
-rw-r--r-- | src/manage.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/manage.c b/src/manage.c index fe04604..f37af49 100644 --- a/src/manage.c +++ b/src/manage.c @@ -142,11 +142,11 @@ send_configure (rp_window *win) ce.type = ConfigureNotify; ce.event = win->w; ce.window = win->w; - ce.x = PADDING_LEFT; - ce.y = PADDING_TOP; - ce.width = win->scr->root_attr.width - PADDING_LEFT - PADDING_RIGHT; - ce.height = win->scr->root_attr.height - PADDING_TOP - PADDING_BOTTOM; - ce.border_width = 0; + ce.x = win->x; + ce.y = win->y; + ce.width = win->width; + ce.height = win->height; + ce.border_width = win->border; ce.above = None; ce.override_redirect = 0; @@ -244,3 +244,19 @@ unmanaged_window (Window w) return 0; } +/* Set the state of the window. + + FIXME: This is sort of broken. We should really record the state in + win->state and mimic the X states NormalState, WithdrawnState, + IconicState */ +void +set_state (rp_window *win, int state) +{ + long data[2]; + + data[0] = (long)state; + data[1] = (long)None; + + XChangeProperty (dpy, win->w, wm_state, wm_state, 32, + PropModeReplace, (unsigned char *)data, 2); +} |