diff options
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/actions.c | 13 | ||||
-rw-r--r-- | src/manage.c | 9 |
3 files changed, 24 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 096872b..653c81c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2000-12-15 shawn <sabetts@badbox.secure.basis.org> + + * actions.c (maximize): increment size in hints->width_inc and hints->height_inc intervals + + * manage.c (manage): set the dimension members of the rp_window struct + 2000-12-15 shawn <sabetts@diggin.lamenet.tmp> * manage.c (manage): added ColormapChangeMask and diff --git a/src/actions.c b/src/actions.c index 3bb6bab..84be700 100644 --- a/src/actions.c +++ b/src/actions.c @@ -362,8 +362,17 @@ maximize (void *data) by the window */ if (win->hints->flags & PResizeInc) { - maxx -= maxx % win->hints->width_inc; - maxy -= maxy % win->hints->height_inc; + int amount; + + amount = maxx - win->width; + amount -= amount % win->hints->width_inc; + PRINT_DEBUG ("amount x: %d\n", amount); + maxx = amount + win->width; + + amount = maxy - win->height; + amount -= amount % win->hints->height_inc; + PRINT_DEBUG ("amount y: %d\n", amount); + maxy = amount + win->height; } PRINT_DEBUG ("maxsize: %d %d\n", maxx, maxy); diff --git a/src/manage.c b/src/manage.c index 153793d..fe04604 100644 --- a/src/manage.c +++ b/src/manage.c @@ -58,7 +58,8 @@ update_normal_hints (rp_window *win) XGetWMNormalHints (dpy, win->w, win->hints, &supplied); - PRINT_DEBUG ("hints: maxx: %d maxy: %d incx: %d incy: %d\n", + PRINT_DEBUG ("hints: minx: %d miny: %d maxx: %d maxy: %d incx: %d incy: %d\n", + win->hints->min_width, win->hints->min_height, win->hints->max_width, win->hints->max_height, win->hints->width_inc, win->hints->height_inc); } @@ -167,9 +168,13 @@ manage (rp_window *win, screen_info *s) /* Get the colormap */ XGetWindowAttributes (dpy, win->w, &attr); win->colormap = attr.colormap; + win->x = attr.x; + win->y = attr.y; + win->width = attr.width; + win->height = attr.height; /* We successfully got the name, which means we can start managing! */ - XSelectInput (dpy, win->w, PropertyChangeMask | ColormapChangeMask | StructureNotifyMask); + XSelectInput (dpy, win->w, PropertyChangeMask | ColormapChangeMask); XAddToSaveSet(dpy, win->w); grab_prefix_key (win->w); |