diff options
author | sabetts <sabetts> | 2001-02-23 10:12:14 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-02-23 10:12:14 +0000 |
commit | 65a47e5685546d2810293f249d2fdd589239926f (patch) | |
tree | 8c5c7a84ae90325a1c50d91280285a898c09e909 /src/events.c | |
parent | 4a1fbcfa9fd7bb43e9b387ca271a37e9bed03adb (diff) | |
download | ratpoison-65a47e5685546d2810293f249d2fdd589239926f.zip |
* main.c (main): passes return value of find_window_other() to
set_active_window().
* list.h (remove_from_window_list): removed prototype
(find_window_in_list): new prototype
(append_to_list): likewise
(insert_into_list): likewise
(remove_from_list): likewise
* list.c: propogated use of rp_unmapped_window_sentinel and
rp_mapped_window_sentinel.
(find_window_in_list): new function
(find_window): calls find_window_in_list to search mapped and
unmapped window lists.
(remove_from_window_list): removed function
(init_window_list): initialized sentinels
(find_window_prev): searches only the mapped window list.
(find_window_next): likewise
(find_window_other): likewise
(append_to_list): new function
(insert_into_list): new function
(remove_from_list): new function
* events.c (unmap_notify): Searches only the mapped window
list. moves the window from the unmapped window list to the mapped
window list.
* data.h: removed rp_window_head and rp_window_tail, updated
dependant files. Added rp_mapped_window_sentinel and
rp_unmapped_window_sentinel globals.
* bar.c (update_window_names): loops only through mapped window
list.
Diffstat (limited to 'src/events.c')
-rw-r--r-- | src/events.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/events.c b/src/events.c index ce81d24..2c56253 100644 --- a/src/events.c +++ b/src/events.c @@ -44,6 +44,7 @@ new_window (XCreateWindowEvent *e) if (e->override_redirect) return; s = find_screen (e->parent); + win = find_window (e->window); if (s && !win && e->window != s->key_window && e->window != s->bar_window @@ -61,7 +62,9 @@ unmap_notify (XEvent *ev) rp_window *win; s = find_screen (ev->xunmap.event); - win = find_window (ev->xunmap.window); + + /* FIXME: Should we only look in the mapped window list? */ + win = find_window_in_list (ev->xunmap.window, rp_mapped_window_sentinel); if (s && win) { @@ -72,6 +75,9 @@ unmap_notify (XEvent *ev) return_window_number (win->number); win->number = -1; win->state = STATE_UNMAPPED; + + remove_from_list (win); + append_to_list (win, rp_unmapped_window_sentinel); /* Update the state of the actual window */ ignore_badwindow = 1; |