Commit a5d1bc41 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Always trap errors around calls to XSetInputFocus since we have no way of

Wed May  2 17:26:22 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkevents-x11.c gdk/x11/gdkwindow-x11.c: Always
	trap errors around calls to XSetInputFocus since we have
	no way of knowing reliably whether we are viewable or
	not. (#53947)
parent bdd655c7
Wed May 2 17:26:22 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c gdk/x11/gdkwindow-x11.c: Always
trap errors around calls to XSetInputFocus since we have
no way of knowing reliably whether we are viewable or
not. (#53947)
Tue May 1 09:21:23 2001 Jonathan Blandford <jrb@webwynk.net>
* gtk/gtktreeview.c (gtk_tree_view_button_release_drag_column):
......
Wed May 2 17:26:22 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c gdk/x11/gdkwindow-x11.c: Always
trap errors around calls to XSetInputFocus since we have
no way of knowing reliably whether we are viewable or
not. (#53947)
Tue May 1 09:21:23 2001 Jonathan Blandford <jrb@webwynk.net>
* gtk/gtktreeview.c (gtk_tree_view_button_release_drag_column):
......
Wed May 2 17:26:22 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c gdk/x11/gdkwindow-x11.c: Always
trap errors around calls to XSetInputFocus since we have
no way of knowing reliably whether we are viewable or
not. (#53947)
Tue May 1 09:21:23 2001 Jonathan Blandford <jrb@webwynk.net>
* gtk/gtktreeview.c (gtk_tree_view_button_release_drag_column):
......
Wed May 2 17:26:22 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c gdk/x11/gdkwindow-x11.c: Always
trap errors around calls to XSetInputFocus since we have
no way of knowing reliably whether we are viewable or
not. (#53947)
Tue May 1 09:21:23 2001 Jonathan Blandford <jrb@webwynk.net>
* gtk/gtktreeview.c (gtk_tree_view_button_release_drag_column):
......
Wed May 2 17:26:22 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c gdk/x11/gdkwindow-x11.c: Always
trap errors around calls to XSetInputFocus since we have
no way of knowing reliably whether we are viewable or
not. (#53947)
Tue May 1 09:21:23 2001 Jonathan Blandford <jrb@webwynk.net>
* gtk/gtktreeview.c (gtk_tree_view_button_release_drag_column):
......
Wed May 2 17:26:22 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c gdk/x11/gdkwindow-x11.c: Always
trap errors around calls to XSetInputFocus since we have
no way of knowing reliably whether we are viewable or
not. (#53947)
Tue May 1 09:21:23 2001 Jonathan Blandford <jrb@webwynk.net>
* gtk/gtktreeview.c (gtk_tree_view_button_release_drag_column):
......
Wed May 2 17:26:22 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c gdk/x11/gdkwindow-x11.c: Always
trap errors around calls to XSetInputFocus since we have
no way of knowing reliably whether we are viewable or
not. (#53947)
Tue May 1 09:21:23 2001 Jonathan Blandford <jrb@webwynk.net>
* gtk/gtktreeview.c (gtk_tree_view_button_release_drag_column):
......
......@@ -1487,8 +1487,16 @@ gdk_wm_protocols_filter (GdkXEvent *xev,
GdkWindow *win = event->any.window;
Window focus_win = GDK_WINDOW_IMPL_X11(((GdkWindowObject *)win)->impl)->focus_window;
XSetInputFocus (GDK_WINDOW_XDISPLAY (win), focus_win,
RevertToParent, xevent->xclient.data.l[1]);
/* There is no way of knowing reliably whether we are viewable so we need
* to trap errors so we don't cause a BadMatch.
*/
gdk_error_trap_push ();
XSetInputFocus (GDK_WINDOW_XDISPLAY (win),
focus_win,
RevertToParent,
xevent->xclient.data.l[1]);
XSync (GDK_WINDOW_XDISPLAY (win), False);
gdk_error_trap_pop ();
}
else if ((Atom) xevent->xclient.data.l[0] == gdk_atom_intern ("_NET_WM_PING", FALSE))
{
......
......@@ -1120,10 +1120,17 @@ gdk_window_focus (GdkWindow *window,
else
{
XRaiseWindow (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window));
/* There is no way of knowing reliably whether we are viewable so we need
* to trap errors so we don't cause a BadMatch.
*/
gdk_error_trap_push ();
XSetInputFocus (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XWINDOW (window),
RevertToNone,
timestamp);
XSync (GDK_WINDOW_XDISPLAY (window), False);
gdk_error_trap_pop ();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment