summaryrefslogtreecommitdiff
path: root/src/manage.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-05-16 23:25:06 +0000
committersabetts <sabetts>2003-05-16 23:25:06 +0000
commitcf843449115562fe44be792e37bd78639414da4e (patch)
tree0eba8dbd41b3ad9328b600ca35b4d41e34aaec60 /src/manage.c
parentbcf85f95069519c29b2263ff5391a4da0442188e (diff)
downloadratpoison-cf843449115562fe44be792e37bd78639414da4e.zip
* src/window.c (add_to_window_list): add the window to the current
group. (find_window_name): search the current group for a matching window. (find_window_other): likewise. (format_window_name): take a rp_window_elem as an argument, not an rp_window. Print the group window's number, not the window's internal number. (get_window_list): loop through the current group. * src/split.c (find_window_for_frame): search the current group for a window to fit in the frame. * src/ratpoison.h: include globals.h and group.h * src/manage.c (unmanage): remove the window from any groups it was in. (map_window): map the window in any groups it is in. (withdraw_window): unmap the window in any groups it is in. * src/main.c: Move all globals to globals.h (main): initialize the group functions. * src/data.h: Move all defines and extern globals to globals.h (struct rp_window_elem): new struct (struct rp_group): likewise * src/actions.h (cmd_gnext): new prototype (cmd_gprev): likewise (cmd_gnew): likewise * src/actions.c (user_commands): new commands gnext, gprev, and gnew (cmd_prev): fix to work with new group code. (cmd_next): likewise (cmd_gnext): new function (cmd_gprev): likewise (cmd_gnew): likewise * src/Makefile.am (ratpoison_SOURCES): add files globals.h, globals.c, group.h and group.c
Diffstat (limited to 'src/manage.c')
-rw-r--r--src/manage.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/manage.c b/src/manage.c
index 4f7fe14..f6d5657 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -347,7 +347,10 @@ void
unmanage (rp_window *w)
{
numset_release (rp_window_numset, w->number);
+
list_del (&w->node);
+ groups_del_window (w);
+
free_window (w);
#ifdef AUTO_CLOSE
@@ -724,6 +727,9 @@ map_window (rp_window *win)
list_del (&win->node);
insert_into_list (win, &rp_mapped_window);
+ /* Update all groups. */
+ groups_map_window (win);
+
/* The window has never been accessed since it was brought back from
the Withdrawn state. */
win->last_access = 0;
@@ -806,6 +812,9 @@ withdraw_window (rp_window *win)
list_move_tail(&win->node, &rp_unmapped_window);
+ /* Update the groups. */
+ groups_unmap_window (win);
+
ignore_badwindow++;
XRemoveFromSaveSet (dpy, win->w);