summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLog.pre-2-109
-rw-r--r--gtk/gtkimcontextsimple.c7
-rw-r--r--gtk/gtktextview.c40
4 files changed, 45 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 5931b5ad2d..539d867cbc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2005-12-06 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkimcontextsimple.c (gtk_im_context_simple_reset): Don't
+ commit from reset, it upstets GtkTextView.
+
+ * gtk/gtktextview.c (gtk_text_view_check_cursor_blink): Be more
+ careful when turning blinking on and off.
+ (gtk_text_view_focus_out_event): Make the cursor really invisible
+ when the focus goes away. (#323087, Sadrul Habib Chowdhury)
+ (cursor_blinks): Check the gtk-cursor-blink setting first.
+
* gtk/gtktreeview.c (gtk_tree_view_key_press): Fix refcounting
issues with new_event and its window.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 5931b5ad2d..539d867cbc 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,14 @@
2005-12-06 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkimcontextsimple.c (gtk_im_context_simple_reset): Don't
+ commit from reset, it upstets GtkTextView.
+
+ * gtk/gtktextview.c (gtk_text_view_check_cursor_blink): Be more
+ careful when turning blinking on and off.
+ (gtk_text_view_focus_out_event): Make the cursor really invisible
+ when the focus goes away. (#323087, Sadrul Habib Chowdhury)
+ (cursor_blinks): Check the gtk-cursor-blink setting first.
+
* gtk/gtktreeview.c (gtk_tree_view_key_press): Fix refcounting
issues with new_event and its window.
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index 0bea1c646f..2433af793d 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -1519,11 +1519,10 @@ gtk_im_context_simple_reset (GtkIMContext *context)
context_simple->compose_buffer[0] = 0;
- if (context_simple->tentative_match)
- gtk_im_context_simple_commit_char (context, context_simple->tentative_match);
-
context_simple->in_hex_sequence = FALSE;
-
+ context_simple->tentative_match = 0;
+ context_simple->tentative_match_len = 0;
+
g_signal_emit_by_name (context_simple, "preedit_changed");
}
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 4544066bfe..e0978b5465 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4125,8 +4125,8 @@ gtk_text_view_focus_out_event (GtkWidget *widget, GdkEventFocus *event)
if (text_view->cursor_visible && text_view->layout)
{
- gtk_text_layout_set_cursor_visible (text_view->layout, FALSE);
gtk_text_view_check_cursor_blink (text_view);
+ gtk_text_layout_set_cursor_visible (text_view->layout, FALSE);
}
g_signal_handlers_disconnect_by_func (gdk_keymap_get_for_display (gtk_widget_get_display (widget)),
@@ -4443,6 +4443,11 @@ cursor_blinks (GtkTextView *text_view)
if (gtk_debug_flags & GTK_DEBUG_UPDATES)
return FALSE;
+ g_object_get (settings, "gtk-cursor-blink", &blink, NULL);
+
+ if (!blink)
+ return FALSE;
+
if (text_view->editable)
{
GtkTextMark *insert;
@@ -4452,10 +4457,7 @@ cursor_blinks (GtkTextView *text_view)
gtk_text_buffer_get_iter_at_mark (get_buffer (text_view), &iter, insert);
if (gtk_text_iter_editable (&iter, text_view->editable))
- {
- g_object_get (settings, "gtk-cursor-blink", &blink, NULL);
- return blink;
- }
+ return blink;
}
return FALSE;
@@ -4515,9 +4517,7 @@ blink_cb (gpointer data)
g_signal_handlers_block_by_func (text_view->layout,
changed_handler,
text_view);
-
gtk_text_layout_set_cursor_visible (text_view->layout, !visible);
-
g_signal_handlers_unblock_by_func (text_view->layout,
changed_handler,
text_view);
@@ -4546,22 +4546,29 @@ gtk_text_view_check_cursor_blink (GtkTextView *text_view)
{
if (text_view->layout != NULL &&
text_view->cursor_visible &&
- GTK_WIDGET_HAS_FOCUS (text_view) &&
- cursor_blinks (text_view))
+ GTK_WIDGET_HAS_FOCUS (text_view))
{
- if (text_view->blink_timeout == 0)
+ if (cursor_blinks (text_view))
{
+ if (text_view->blink_timeout == 0)
+ {
+ gtk_text_layout_set_cursor_visible (text_view->layout, TRUE);
+
+ text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER,
+ blink_cb,
+ text_view);
+ }
+ }
+ else
+ {
+ gtk_text_view_stop_cursor_blink (text_view);
gtk_text_layout_set_cursor_visible (text_view->layout, TRUE);
-
- text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER,
- blink_cb,
- text_view);
}
}
else
{
gtk_text_view_stop_cursor_blink (text_view);
- gtk_text_layout_set_cursor_visible (text_view->layout, TRUE);
+ gtk_text_layout_set_cursor_visible (text_view->layout, FALSE);
}
}
@@ -5721,13 +5728,14 @@ gtk_text_view_start_selection_drag (GtkTextView *text_view,
}
gtk_text_buffer_select_range (buffer, &end, &start);
- gtk_text_view_check_cursor_blink (text_view);
data->orig_start = gtk_text_buffer_create_mark (buffer, NULL,
&start, TRUE);
data->orig_end = gtk_text_buffer_create_mark (buffer, NULL,
&end, TRUE);
+ gtk_text_view_check_cursor_blink (text_view);
+
text_view->selection_drag_handler = g_signal_connect_data (text_view,
"motion_notify_event",
G_CALLBACK (selection_motion_event_handler),