Commit 17d37755 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Matthias Clasen

Ensure the insertion handle stays on fake events (eg from IM)

Don't set handles mode to none if the event has send_event set.
For consistency with GtkEntry, also make GtkTextView keep the
handle mode on buffer changes.
parent d97861bd
......@@ -4492,8 +4492,10 @@ gtk_entry_key_press (GtkWidget *widget,
gtk_entry_reset_blink_time (entry);
gtk_entry_pend_cursor_blink (entry);
_gtk_text_handle_set_mode (priv->text_handle,
GTK_TEXT_HANDLE_MODE_NONE);
if (!event->send_event)
_gtk_text_handle_set_mode (priv->text_handle,
GTK_TEXT_HANDLE_MODE_NONE);
if (priv->editable)
{
......
......@@ -4755,8 +4755,9 @@ gtk_text_view_key_press_event (GtkWidget *widget, GdkEventKey *event)
gtk_text_view_reset_blink_time (text_view);
gtk_text_view_pend_cursor_blink (text_view);
_gtk_text_handle_set_mode (priv->text_handle,
GTK_TEXT_HANDLE_MODE_NONE);
if (!event->send_event)
_gtk_text_handle_set_mode (priv->text_handle,
GTK_TEXT_HANDLE_MODE_NONE);
return retval;
}
......@@ -6376,7 +6377,10 @@ gtk_text_view_buffer_changed_handler (GtkTextBuffer *buffer,
gpointer data)
{
GtkTextView *text_view = data;
gtk_text_view_update_handles (text_view, GTK_TEXT_HANDLE_MODE_NONE);
GtkTextViewPrivate *priv = text_view->priv;
gtk_text_view_update_handles (text_view,
_gtk_text_handle_get_mode (priv->text_handle));
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment