]> Pileus Git - ~andy/gtk/commitdiff
Update IM spot location at appropriate times, #50626
authorHavoc Pennington <hp@redhat.com>
Tue, 23 Oct 2001 17:26:13 +0000 (17:26 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Tue, 23 Oct 2001 17:26:13 +0000 (17:26 +0000)
2001-10-23  Havoc Pennington  <hp@redhat.com>

* gtk/gtktextview.c (gtk_text_view_update_im_spot_location):
Update IM spot location at appropriate times, #50626

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextview.c

index 4bdff1bbc9de856deb9e09be0ccc60de3c129542..bb92e4f141d99560ebf571c07fea42ca4a671a8c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-23  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_update_im_spot_location): 
+       Update IM spot location at appropriate times, #50626
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_grab_focus): scroll to cursor
index 4bdff1bbc9de856deb9e09be0ccc60de3c129542..bb92e4f141d99560ebf571c07fea42ca4a671a8c 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-23  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_update_im_spot_location): 
+       Update IM spot location at appropriate times, #50626
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_grab_focus): scroll to cursor
index 4bdff1bbc9de856deb9e09be0ccc60de3c129542..bb92e4f141d99560ebf571c07fea42ca4a671a8c 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-23  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_update_im_spot_location): 
+       Update IM spot location at appropriate times, #50626
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_grab_focus): scroll to cursor
index 4bdff1bbc9de856deb9e09be0ccc60de3c129542..bb92e4f141d99560ebf571c07fea42ca4a671a8c 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-23  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_update_im_spot_location): 
+       Update IM spot location at appropriate times, #50626
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_grab_focus): scroll to cursor
index 4bdff1bbc9de856deb9e09be0ccc60de3c129542..bb92e4f141d99560ebf571c07fea42ca4a671a8c 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-23  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_update_im_spot_location): 
+       Update IM spot location at appropriate times, #50626
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_grab_focus): scroll to cursor
index 4bdff1bbc9de856deb9e09be0ccc60de3c129542..bb92e4f141d99560ebf571c07fea42ca4a671a8c 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-23  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_update_im_spot_location): 
+       Update IM spot location at appropriate times, #50626
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_grab_focus): scroll to cursor
index 4bdff1bbc9de856deb9e09be0ccc60de3c129542..bb92e4f141d99560ebf571c07fea42ca4a671a8c 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-23  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_update_im_spot_location): 
+       Update IM spot location at appropriate times, #50626
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_grab_focus): scroll to cursor
index 968abde9f2b5400e873c831161226c249dba41bb..cc498d7435b159ab01dea36884245614126f9d5f 100644 (file)
@@ -290,6 +290,8 @@ static void gtk_text_view_queue_scroll           (GtkTextView   *text_view,
 static gboolean gtk_text_view_flush_scroll       (GtkTextView *text_view);
 static void     gtk_text_view_update_adjustments (GtkTextView *text_view);
 
+static void gtk_text_view_update_im_spot_location (GtkTextView *text_view);
+
 /* Container methods */
 static void gtk_text_view_add    (GtkContainer *container,
                                   GtkWidget    *child);
@@ -1603,6 +1605,24 @@ gtk_text_view_update_layout_width (GtkTextView *text_view)
                                     SCREEN_WIDTH (text_view));
 }
 
+static void
+gtk_text_view_update_im_spot_location (GtkTextView *text_view)
+{
+  GdkRectangle area;
+  gint cursor_x_pos, cursor_y_pos;
+
+  if (text_view->layout == NULL)
+    return;
+  
+  gtk_text_view_get_virtual_cursor_pos (text_view, &cursor_x_pos, &cursor_y_pos);
+
+  area.x = cursor_x_pos;
+  area.y = cursor_y_pos;
+  area.width = area.height = 0;
+
+  gtk_im_context_set_cursor_location (text_view->im_context, &area);
+}
+
 /**
  * gtk_text_view_scroll_to_mark:
  * @text_view: a #GtkTextView
@@ -4653,6 +4673,7 @@ gtk_text_view_reset_im_context (GtkTextView *text_view)
     {
       text_view->need_im_reset = FALSE;
       gtk_im_context_reset (text_view->im_context);
+      gtk_text_view_update_im_spot_location (text_view);
     }
 }
 
@@ -5185,6 +5206,8 @@ gtk_text_view_value_changed (GtkAdjustment *adj,
       g_source_remove (text_view->first_validate_idle);
       text_view->first_validate_idle = 0;
     }
+
+  gtk_text_view_update_im_spot_location (text_view);
   
   DV(g_print(">End scroll offset changed handler ("G_STRLOC")\n"));
 }