From 83b8ce0334def917dac3d47c21e9a6e389007bd0 Mon Sep 17 00:00:00 2001 From: sabetts Date: Sun, 11 Feb 2001 08:10:27 +0000 Subject: * 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(). --- src/manage.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'src/manage.c') 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); +} -- cgit v1.2.3