summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrcyeske <rcyeske>2004-01-26 07:11:12 +0000
committerrcyeske <rcyeske>2004-01-26 07:11:12 +0000
commit40bcdaab7b5f418208110b7b3b106375c3d5464f (patch)
tree331f5ea027eca76c2e77cbfc543e804bbafc7236
parent4b75ac555c4205341ddf9d786225a48d8be3b2ad (diff)
downloadratpoison-40bcdaab7b5f418208110b7b3b106375c3d5464f.zip
(sync_wins): Change list_for_each_entry to
list_for_each_entry_safe. (cmd_tmpwm): Unhide and maximize each mapped window before spawning a new wm.
-rw-r--r--ChangeLog7
-rw-r--r--src/actions.c18
2 files changed, 20 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 39387b6..3f815dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-25 Ryan Yeske <rcyeske@vcn.bc.ca>
+
+ * src/actions.c (sync_wins): Change list_for_each_entry to
+ list_for_each_entry_safe.
+ (cmd_tmpwm): Unhide and maximize each mapped window before
+ spawning a new wm.
+
2003-11-29 Ryan Yeske <rcyeske@vcn.bc.ca>
* src/communications.c (receive_command_result): Rename from
diff --git a/src/actions.c b/src/actions.c
index f547a38..f8f0d41 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -3035,11 +3035,15 @@ cmd_warp (int interactive, char *data)
return NULL;
}
-/* FIXME: This is sorely broken. */
+/* FIXME: This is sorely broken.
+
+ UPDATE: I changed the list_for_each_entry to
+ list_for_each_entry_safe, does this make it less broken?
+ (rcyeske@vcn.bc.ca 20040125) */
static void
sync_wins (rp_screen *s)
{
- rp_window *win;
+ rp_window *win, *wintmp;
XWindowAttributes attr;
unsigned int i, nwins;
Window dw1, dw2, *wins;
@@ -3047,7 +3051,7 @@ sync_wins (rp_screen *s)
/* Remove any windows in our cached lists that aren't in the query
tree. These windows have been destroyed. */
- list_for_each_entry (win, &rp_mapped_window, node)
+ list_for_each_entry_safe (win, wintmp, &rp_mapped_window, node)
{
int found;
@@ -3147,7 +3151,6 @@ sync_wins (rp_screen *s)
win = find_window_in_list (wins[i], &rp_unmapped_window);
if (win)
{
- rp_frame *frame;
/* If the window is viewable and it is in a frame, then
maximize it and go to the next window. */
if (attr.map_state == IsViewable)
@@ -3213,7 +3216,12 @@ cmd_tmpwm (int interactive, char *data)
/* Don't listen for any events from any window. */
list_for_each_safe_entry (win, iter, tmp, &rp_mapped_window, node)
- XSelectInput (dpy, win->w, 0);
+ {
+ unhide_window (win);
+ maximize (win);
+ XSelectInput (dpy, win->w, 0);
+ }
+
list_for_each_safe_entry (win, iter, tmp, &rp_unmapped_window, node)
XSelectInput (dpy, win->w, 0);