Ximian bug #14205 - gnome-spell-0.4-ximian.1 doesn't work with RC1 Evolution



See the ChangeLog bits for an explanation of the bug.

Is this OK to commit?

  Federico

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/bonobo/ChangeLog,v
retrieving revision 1.1141
diff -u -r1.1141 ChangeLog
--- ChangeLog	2001/11/07 02:17:14	1.1141
+++ ChangeLog	2001/11/08 22:22:52
@@ -1,3 +1,11 @@
+2001-11-08  Federico Mena Quintero  <federico ximian com>
+
+	* bonobo/bonobo-socket.c (bonobo_socket_focus_out_event): Only
+	XSetInputFocus() if the toplevel is mapped.  And even though we
+	make the check, push an error trap in case any of the toplevel's
+	ancestors, namely the window manager frame, is not mapped.  Fixes
+	Ximian bug #14205.
+
 2001-11-07  Michael Meeks  <michael ximian com>
 
 	* Version 1.0.15
Index: bonobo/bonobo-socket.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-socket.c,v
retrieving revision 1.20
diff -u -r1.20 bonobo-socket.c
--- bonobo/bonobo-socket.c	2001/10/10 02:20:58	1.20
+++ bonobo/bonobo-socket.c	2001/11/08 22:22:54
@@ -521,10 +521,19 @@
 
 	toplevel = gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW);
 
-	if (toplevel)
+	if (toplevel && GTK_WIDGET_MAPPED (toplevel)) {
+		/* XSetInputFocus() will BadMatch if the window is not viewable;
+		 * that is why we put the test for MAPPED above.  Still, any of
+		 * its ancestors, namely the window manager frame, may not be
+		 * mapped, so we push an error trap anyways.
+		 */
+		gdk_error_trap_push ();
 		XSetInputFocus (GDK_DISPLAY (),
 				GDK_WINDOW_XWINDOW (toplevel->window),
 				RevertToParent, CurrentTime);
+		gdk_flush ();
+		gdk_error_trap_pop ();
+	}
 
 	priv->gave_focus = FALSE;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]