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
This commit is contained in:
committed by
Chris Lahey
parent
50a2e734db
commit
a5fef3a82e
@ -1,3 +1,7 @@
|
||||
2000-04-10 Christopher James Lahey <clahey@helixcode.com>
|
||||
|
||||
* e-canvas.c: Added proper keyboard focus handling.
|
||||
|
||||
2000-04-06 Matt Loper <matt@helixcode.com>
|
||||
|
||||
* e-setup.c (e_setup_base_dir): Get/set Evolution's base directory
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user