summaryrefslogtreecommitdiff
path: root/src/manage.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2000-12-09 23:43:32 +0000
committersabetts <sabetts>2000-12-09 23:43:32 +0000
commit6eb8f2a4f20a82a719fec33ecf29d7382794c796 (patch)
tree12c844bc3a80da5826029c84342594d2c34d663c /src/manage.c
parent3068ac85a5716aff7b3ff0652220c9504b3c00b1 (diff)
downloadratpoison-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/manage.c')
-rw-r--r--src/manage.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/manage.c b/src/manage.c
index 7f6017a..aaff55a 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -113,6 +113,25 @@ update_window_name (rp_window *win)
return 1;
}
+/* Send an artificial configure event to the window. */
+void
+send_configure (rp_window *win)
+{
+ XConfigureEvent ce;
+
+ 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.above = None;
+ ce.override_redirect = 0;
+
+ XSendEvent (dpy, win->w, False, StructureNotifyMask, (XEvent*)&ce);
+}
void
manage (rp_window *win, screen_info *s)
@@ -121,14 +140,15 @@ manage (rp_window *win, screen_info *s)
/* We successfully got the name, which means we can start managing! */
XMapWindow (dpy, win->w);
- XMoveResizeWindow (dpy, win->w,
- PADDING_LEFT,
- PADDING_TOP,
- s->root_attr.width - PADDING_LEFT - PADDING_RIGHT,
- s->root_attr.height - PADDING_TOP - PADDING_BOTTOM);
XSelectInput (dpy, win->w, PropertyChangeMask);
XAddToSaveSet(dpy, win->w);
grab_prefix_key (win->w);
+/* XMoveResizeWindow (dpy, win->w, */
+/* PADDING_LEFT, */
+/* PADDING_TOP, */
+/* s->root_attr.width - PADDING_LEFT - PADDING_RIGHT, */
+/* s->root_attr.height - PADDING_TOP - PADDING_BOTTOM); */
+/* send_configure (win); */
win->state = STATE_MAPPED;
win->number = get_unique_window_number ();