After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 112835 - GtkTextView places cursor onscreen on focus gain
GtkTextView places cursor onscreen on focus gain
Status: RESOLVED DUPLICATE of bug 81893
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-05-12 13:20 UTC by Jeroen Zwartepoorte
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description Jeroen Zwartepoorte 2003-05-12 13:20:43 UTC
When a GtkTextView gains focus (through gtk_widget_grab_focus for example),
it appears GtkTextView calls gtk_text_view_place_cursor_onscreen to make
the cursor position appear on screen.

This causes lots of grief in gedit, anjuta2 and other apps which use a
GtkNotebook based MDI approach. When you've scrolled down a file and then
changes tabs in gedit and move back, you get to scroll all the way down
again since the text view moved the scrollbar all the way back to the top
(where the cursor is). This is the wrong behavior imo.
Comment 1 Jeroen Zwartepoorte 2003-05-12 13:24:02 UTC
See the gtk_text_view_grab_focus in gtktextview.c (line 4236) and the
disable_scroll_on_focus variable. What's the reasoning behind
scrolling to the cursor position on grab_focus?
Comment 2 Matthias Clasen 2003-05-12 13:28:34 UTC

*** This bug has been marked as a duplicate of 81893 ***