2005-01-02 Marco Pesenti Gritti <marco@gnome.org>
* shell/ev-view.c: (ev_view_realize), (ev_view_button_press_event):
Grab focus on the view when clicking it
+2005-01-02 Marco Pesenti Gritti <marco@gnome.org>
+
+ * shell/ev-view.c: (ev_view_realize), (ev_view_button_press_event):
+
+ Grab focus on the view when clicking it
+
2005-01-02 Marco Pesenti Gritti <marco@gnome.org>
* shell/ev-marshal.list:
attributes.width = MAX (widget->allocation.width, widget->requisition.width);
attributes.height = MAX (widget->allocation.height, widget->requisition.height);
attributes.event_mask = GDK_EXPOSURE_MASK |
+ GDK_BUTTON_PRESS_MASK |
GDK_SCROLL_MASK |
GDK_KEY_PRESS_MASK;
ev_view_button_press_event (GtkWidget *widget,
GdkEventButton *event)
{
- /* EvView *view = EV_VIEW (widget); */
+ if (event->type == GDK_BUTTON_PRESS) {
+ if (!GTK_WIDGET_HAS_FOCUS (widget)) {
+ gtk_widget_grab_focus (widget);
+ }
+ }
- return FALSE;
+ return TRUE;
}
static gboolean