From c2f31737d4e362e9193ca73c2fe9329b0ff9acfe Mon Sep 17 00:00:00 2001 From: sabetts Date: Fri, 15 Dec 2000 09:57:08 +0000 Subject: added commenting --- src/manage.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'src/manage.c') diff --git a/src/manage.c b/src/manage.c index aaff55a..53a58d9 100644 --- a/src/manage.c +++ b/src/manage.c @@ -51,6 +51,19 @@ grab_prefix_key (Window w) #endif } +void +update_normal_hints (rp_window *win) +{ + long supplied; + + XGetWMNormalHints (dpy, win->w, win->hints, &supplied); + + PRINT_DEBUG ("hints: maxx: %d maxy: %d incx: %d incy: %d\n", + win->hints->max_width, win->hints->max_height, + win->hints->width_inc, win->hints->height_inc); +} + + char * get_window_name (Window w) { @@ -136,19 +149,19 @@ send_configure (rp_window *win) void manage (rp_window *win, screen_info *s) { + XMapWindow (dpy, win->w); + if (!update_window_name (win)) return; + /* Get the WM Hints */ + update_normal_hints (win); + /* We successfully got the name, which means we can start managing! */ - XMapWindow (dpy, win->w); 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); */ + + maximize (win); win->state = STATE_MAPPED; win->number = get_unique_window_number (); -- cgit v1.2.3