patch to gnome-canvas



The included patch fixes a bug in the gnome-canvas -- the canvas'
focus-in/out methods don't set/unset the HAS_FOCUS flag of the canvas
widget. This means that gtk_window_focus_out_event () doesn't propagate
the focus-out event to the canvas (since it doesn't think it's focused)

Does anyone have any objections to me committing this? (and if not,
which branch(es) should I commit it on?)

	John


Index: libgnomeui/ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnomeui/ChangeLog,v
retrieving revision 1.1161.4.99
diff -u -r1.1161.4.99 ChangeLog
--- libgnomeui/ChangeLog	2000/11/30 22:08:10	1.1161.4.99
+++ libgnomeui/ChangeLog	2001/01/06 00:36:46
@@ -1,3 +1,11 @@
+2001-01-05  John Harper  <jsh eazel com>
+
+	* gnome-canvas.c (gnome_canvas_focus_in,
+	gnome_canvas_focus_out): added code to set and unset the
+	HAS_FOCUS flag (which all focusable widgets should do). Without
+	this patch the canvas (and thus the focused canvas item) will
+	not receive focus out events
+
 2000-11-30  Mike Engber  <engber eazel com>
 
 	* gnome-canvas.c:
Index: libgnomeui/gnome-canvas.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnomeui/gnome-canvas.c,v
retrieving revision 1.93.4.14
diff -u -r1.93.4.14 gnome-canvas.c
--- libgnomeui/gnome-canvas.c	2000/11/30 22:08:09	1.93.4.14
+++ libgnomeui/gnome-canvas.c	2001/01/06 00:36:46
@@ -3133,6 +3133,8 @@
 {
 	GnomeCanvas *canvas;
 
+	GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
+
 	canvas = GNOME_CANVAS (widget);
 
 #if 0
@@ -3151,6 +3153,8 @@
 gnome_canvas_focus_out (GtkWidget *widget, GdkEventFocus *event)
 {
 	GnomeCanvas *canvas;
+
+	GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
 
 	canvas = GNOME_CANVAS (widget);
 




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