From 848cacc4905bc5a0423db986119fc708a4ec4ef1 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Tue, 2 May 2000 22:26:16 +0000 Subject: set and reset the GTK_HAS_FOCUS flag. We now get focus_out events 2000-05-02 Damon Chaplin * e-canvas.c (e_canvas_focus_in): (e_canvas_focus_out): set and reset the GTK_HAS_FOCUS flag. We now get focus_out events correctly. svn path=/trunk/; revision=2758 --- widgets/misc/e-canvas.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'widgets/misc') diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index ad0819e3dd..8ca7d0f9b1 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -313,6 +313,8 @@ e_canvas_focus_in (GtkWidget *widget, GdkEventFocus *event) canvas = GNOME_CANVAS (widget); + GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS); + if (canvas->focused_item) return emit_event (canvas, (GdkEvent *) event); else @@ -327,6 +329,8 @@ e_canvas_focus_out (GtkWidget *widget, GdkEventFocus *event) canvas = GNOME_CANVAS (widget); + GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS); + if (canvas->focused_item) return emit_event (canvas, (GdkEvent *) event); else -- cgit v1.2.3