From 0d8bccdf85cf8e55f8cc1246908a2df79abccec0 Mon Sep 17 00:00:00 2001 From: sabetts Date: Wed, 28 Feb 2001 05:15:04 +0000 Subject: * main.c (handler): Prepends error message with "ERROR: ". Displays error in message bar. Returns 0. * events.c (destroy_window): sets rp_current_window to NULL when there are no more mapped windows. (destroy_window): calls set_current_window and find_window_other directly instead of cmd_other. --- src/events.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/events.c') diff --git a/src/events.c b/src/events.c index 2c56253..13cab22 100644 --- a/src/events.c +++ b/src/events.c @@ -171,10 +171,16 @@ destroy_window (XDestroyWindowEvent *ev) unmanage (win); - /* Switch to last viewed window */ - ignore_badwindow = 1; - cmd_other (NULL); - ignore_badwindow = 0; + if (rp_mapped_window_sentinel->next == rp_mapped_window_sentinel + && rp_mapped_window_sentinel->prev == rp_mapped_window_sentinel) + { + rp_current_window = NULL; + } + else + { + /* Switch to last viewed window */ + set_current_window( find_window_other() ); + } } else { @@ -252,10 +258,10 @@ configure_request (XConfigureRequestEvent *e) need_resize = 1; } - if (need_move && !need_resize) - { +/* if (need_move && !need_resize) */ +/* { */ send_configure (win); - } +/* } */ maximize (win); @@ -360,9 +366,11 @@ key_press (XEvent *ev) { if (rp_current_window) { + ignore_badwindow = 1; ev->xkey.window = rp_current_window->w; XSendEvent (dpy, rp_current_window->w, False, KeyPressMask, ev); XSync (dpy, False); + ignore_badwindow = 0; } } } -- cgit v1.2.3