diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/display.c | 20 |
2 files changed, 26 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2004-12-27 Elijah Newren <newren@gmail.com> + + * src/display.c (meta_display_set_input_focus_window, + meta_display_focus_the_no_focus_window): Spew warning if + CurrentTime is passed to the function, but don't exit prematurely. + (fixes #162353) + 2004-12-24 Elijah Newren <newren@gmail.com> * src/window.c (meta_window_show_menu): Don't show menu if all @@ -59,7 +66,7 @@ Rename meta_window_visible_on_workspace to meta_window_located_on_workspace (whether or not the window was showing wasn't taken into account, which made "visible" - confusing). + confusing). Fixes #136314. 2004-12-22 Elijah Newren <newren@gmail.com> diff --git a/src/display.c b/src/display.c index c17d82b5..4730b0a1 100644 --- a/src/display.c +++ b/src/display.c @@ -4611,7 +4611,14 @@ meta_display_set_input_focus_window (MetaDisplay *display, gboolean focus_frame, Time timestamp) { - if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time)) + if (timestamp == CurrentTime) + { + meta_warning ("meta_display_set_input_focus_window called with a " + "timestamp of 0 for window %s. This shouldn't happen!\n", + window->desc); + meta_print_backtrace (); + } + else if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time)) return; XSetInputFocus (display->xdisplay, @@ -4629,8 +4636,17 @@ void meta_display_focus_the_no_focus_window (MetaDisplay *display, Time timestamp) { - if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time)) + if (timestamp == CurrentTime) + { + meta_warning ("meta_display_focus_the_no_focus_window called with a " + "timestamp of 0. This shouldn't happen!\n"); + meta_print_backtrace (); + } + else if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time)) + { + meta_warning ("Ignoring focus request for no_focus_window since %lu is less than %lu.\n", timestamp, display->last_focus_time); return; + } XSetInputFocus (display->xdisplay, display->no_focus_window, |