summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-06-02 10:12:52 +0000
committersabetts <sabetts>2001-06-02 10:12:52 +0000
commit981e11ac363e79419d08c158ceb0d257ee87a69b (patch)
treee8a5e649fe5dd3ade4c9a901118a992e82aa45c5 /src/events.c
parent2a84949a2adb5e342db8043512c3866f2e396e5b (diff)
downloadratpoison-981e11ac363e79419d08c158ceb0d257ee87a69b.zip
* src/manage.c (hide_window): ignore unmap_notify events when
unmapping the window. * src/list.c (add_to_window_list): use WIN_EVENTS in XSelectInput. * src/data.h (struct rp_window): remove iconizing field. remove code using iconizing. (WIN_EVENTS): new define
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/src/events.c b/src/events.c
index db5a41f..824b98e 100644
--- a/src/events.c
+++ b/src/events.c
@@ -100,31 +100,22 @@ unmap_notify (XEvent *ev)
{
rp_window_frame *frame;
- if (win->iconizing)
- {
- /* This event is due to our hiding the window. */
- win->iconizing--;
- }
- else
+ switch (win->state)
{
- switch (win->state)
- {
- case IconicState:
- PRINT_DEBUG ("Withdrawing iconized window '%s'\n", win->name);
- if (ev->xunmap.send_event) withdraw_window (win);
- break;
- case NormalState:
- PRINT_DEBUG ("Withdrawing normal window '%s'\n", win->name);
- /* If the window was inside a frame, fill the frame with another
- window. */
- frame = find_windows_frame (win);
- if (frame) cleanup_frame (frame);
- if (frame == rp_current_frame) set_active_frame (frame);
-
-
- withdraw_window (win);
- break;
- }
+ case IconicState:
+ PRINT_DEBUG ("Withdrawing iconized window '%s'\n", win->name);
+ if (ev->xunmap.send_event) withdraw_window (win);
+ break;
+ case NormalState:
+ PRINT_DEBUG ("Withdrawing normal window '%s'\n", win->name);
+ /* If the window was inside a frame, fill the frame with another
+ window. */
+ frame = find_windows_frame (win);
+ if (frame) cleanup_frame (frame);
+ if (frame == rp_current_frame) set_active_frame (frame);
+
+ withdraw_window (win);
+ break;
}
update_window_names (s);