forked from AuroraMiddleware/gtk
texthandle: Set prelight state on the pointer-interacted handle
This will be useful with the theming changes to come. https://bugzilla.gnome.org/show_bug.cgi?id=750396
This commit is contained in:
parent
88d88591d2
commit
1e8be1c446
@ -221,6 +221,15 @@ gtk_text_handle_widget_event (GtkWidget *widget,
|
|||||||
priv->windows[pos].dragged = FALSE;
|
priv->windows[pos].dragged = FALSE;
|
||||||
gtk_text_handle_unset_state (handle, pos, GTK_STATE_FLAG_ACTIVE);
|
gtk_text_handle_unset_state (handle, pos, GTK_STATE_FLAG_ACTIVE);
|
||||||
}
|
}
|
||||||
|
else if (event->type == GDK_ENTER_NOTIFY)
|
||||||
|
gtk_text_handle_set_state (handle, pos, GTK_STATE_FLAG_PRELIGHT);
|
||||||
|
else if (event->type == GDK_LEAVE_NOTIFY)
|
||||||
|
{
|
||||||
|
if (!priv->windows[pos].dragged &&
|
||||||
|
(event->crossing.mode == GDK_CROSSING_NORMAL ||
|
||||||
|
event->crossing.mode == GDK_CROSSING_UNGRAB))
|
||||||
|
gtk_text_handle_unset_state (handle, pos, GTK_STATE_FLAG_PRELIGHT);
|
||||||
|
}
|
||||||
else if (event->type == GDK_MOTION_NOTIFY &&
|
else if (event->type == GDK_MOTION_NOTIFY &&
|
||||||
event->motion.state & GDK_BUTTON1_MASK &&
|
event->motion.state & GDK_BUTTON1_MASK &&
|
||||||
priv->windows[pos].dragged)
|
priv->windows[pos].dragged)
|
||||||
@ -277,6 +286,8 @@ _gtk_text_handle_ensure_widget (GtkTextHandle *handle,
|
|||||||
gtk_widget_set_events (widget,
|
gtk_widget_set_events (widget,
|
||||||
GDK_BUTTON_PRESS_MASK |
|
GDK_BUTTON_PRESS_MASK |
|
||||||
GDK_BUTTON_RELEASE_MASK |
|
GDK_BUTTON_RELEASE_MASK |
|
||||||
|
GDK_ENTER_NOTIFY_MASK |
|
||||||
|
GDK_LEAVE_NOTIFY_MASK |
|
||||||
GDK_POINTER_MOTION_MASK);
|
GDK_POINTER_MOTION_MASK);
|
||||||
|
|
||||||
g_signal_connect (widget, "draw",
|
g_signal_connect (widget, "draw",
|
||||||
|
Loading…
Reference in New Issue
Block a user