summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren gmail com>2006-10-02 04:08:33 +0000
committerElijah Newren <newren@src.gnome.org>2006-10-02 04:08:33 +0000
commitc4fa0d118c3868e7b3d8787fa71ae75702a231d4 (patch)
tree382b7ca559b73b054654bf542edc0379843a286f
parentca3ed6a1ebd466e41ad2861be2296237f813ced4 (diff)
downloadmetacity-c4fa0d118c3868e7b3d8787fa71ae75702a231d4.tar.gz
Don't require a push/pop trap around
2006-10-01 Elijah Newren <newren gmail com> * 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.
-rw-r--r--ChangeLog9
-rw-r--r--src/display.c3
-rw-r--r--src/window.c4
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d4c9e05..ef96ace0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2006-10-01 Elijah Newren <newren gmail com>
+ * 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 <newren gmail com>
+
* src/*.[ch]: Stick an emacs comment directive at the beginning of
all the code files so that people using emacs will be more likely
to get coding style correct in their patches. We still need a
diff --git a/src/display.c b/src/display.c
index cc266d72..9aa9d1d3 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, &timestamp))
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 815e1143..2f46f640 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)