From c4fa0d118c3868e7b3d8787fa71ae75702a231d4 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Mon, 2 Oct 2006 04:08:33 +0000 Subject: [PATCH] Don't require a push/pop trap around 2006-10-01 Elijah Newren * src/display.c (meta_display_set_input_focus_window): * src/window.c (meta_window_focus): Don't require a push/pop trap around meta_display_set_input_focus_window(), but rather move the push/pop into that function surrounding the XSetInputFocus() call directly. Follow up to #358514. --- ChangeLog | 9 +++++++++ src/display.c | 3 +++ src/window.c | 4 ---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d4c9e058..ef96ace08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-10-01 Elijah Newren + + * src/display.c (meta_display_set_input_focus_window): + * src/window.c (meta_window_focus): + Don't require a push/pop trap around + meta_display_set_input_focus_window(), but rather move the + push/pop into that function surrounding the XSetInputFocus() call + directly. Follow up to #358514. + 2006-10-01 Elijah Newren * src/*.[ch]: Stick an emacs comment directive at the beginning of diff --git a/src/display.c b/src/display.c index cc266d728..9aa9d1d3c 100644 --- a/src/display.c +++ b/src/display.c @@ -5002,10 +5002,13 @@ meta_display_set_input_focus_window (MetaDisplay *display, if (timestamp_too_old (display, window, ×tamp)) return; + meta_error_trap_push (display); XSetInputFocus (display->xdisplay, focus_frame ? window->frame->xwindow : window->xwindow, RevertToPointerRoot, timestamp); + meta_error_trap_pop (display, FALSE); + display->expected_focus_window = window; display->last_focus_time = timestamp; display->active_screen = window->screen; diff --git a/src/window.c b/src/window.c index 815e11438..2f46f6402 100644 --- a/src/window.c +++ b/src/window.c @@ -3876,8 +3876,6 @@ meta_window_focus (MetaWindow *window, } else { - meta_error_trap_push (window->display); - if (window->input) { meta_topic (META_DEBUG_FOCUS, @@ -3899,8 +3897,6 @@ meta_window_focus (MetaWindow *window, timestamp); window->display->expected_focus_window = window; } - - meta_error_trap_pop (window->display, FALSE); } if (window->wm_state_demands_attention)