diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-04-11 03:33:35 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-04-11 03:33:35 +0800 |
commit | a5fef3a82e786fbc8efd2ed40fb117bacfeb2279 (patch) | |
tree | cddb05828d73a1f588a756b356a5369896bb0c6d /e-util/e-canvas.c | |
parent | 50a2e734db093829f974324f58c78592f3ee8536 (diff) | |
download | gsoc2013-evolution-a5fef3a82e786fbc8efd2ed40fb117bacfeb2279.tar gsoc2013-evolution-a5fef3a82e786fbc8efd2ed40fb117bacfeb2279.tar.gz gsoc2013-evolution-a5fef3a82e786fbc8efd2ed40fb117bacfeb2279.tar.bz2 gsoc2013-evolution-a5fef3a82e786fbc8efd2ed40fb117bacfeb2279.tar.lz gsoc2013-evolution-a5fef3a82e786fbc8efd2ed40fb117bacfeb2279.tar.xz gsoc2013-evolution-a5fef3a82e786fbc8efd2ed40fb117bacfeb2279.tar.zst gsoc2013-evolution-a5fef3a82e786fbc8efd2ed40fb117bacfeb2279.zip |
Added proper keyboard focus handling.
2000-04-10 Christopher James Lahey <clahey@helixcode.com>
* e-canvas.c: Added proper keyboard focus handling.
svn path=/trunk/; revision=2377
Diffstat (limited to 'e-util/e-canvas.c')
-rw-r--r-- | e-util/e-canvas.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/e-util/e-canvas.c b/e-util/e-canvas.c index 5c6cfd3278..704b6ca12b 100644 --- a/e-util/e-canvas.c +++ b/e-util/e-canvas.c @@ -288,7 +288,19 @@ e_canvas_item_grab_focus (GnomeCanvasItem *item) } item->canvas->focused_item = item; - gtk_widget_grab_focus (GTK_WIDGET (item->canvas)); + + if (!GTK_WIDGET_HAS_FOCUS (GTK_WIDGET(item->canvas))) { + gtk_widget_grab_focus (GTK_WIDGET (item->canvas)); + } + + if (focused_item) { + ev.focus_change.type = GDK_FOCUS_CHANGE; + ev.focus_change.window = GTK_LAYOUT (item->canvas)->bin_window; + ev.focus_change.send_event = FALSE; + ev.focus_change.in = TRUE; + + emit_event (item->canvas, &ev); + } } /* Focus in handler for the canvas */ |