GNOME Bugzilla – Bug 672544
Anchored widgets inside GtkTextView are drawn out of place when GTK_TEXT_WINDOW_LEFT GdkWindow has nonzero width.
Last modified: 2012-04-10 14:34:37 UTC
Created attachment 210228 [details] test case in C++ The attached example (file basilegsvanchbut.cc) to be compiled with g++ -Wall -O -g \ $(pkg-config --cflags --libs gtksourceviewmm-3.0 gtkmm-3.0 gtk+-3.0) \ -o basilegsvanchorbut basilegsvanchorbut.cc and to be executed in the same directory as its own source code (which it displays) show that a button added thru an anchor does not appear drawn at the good position. Plateform GNU/Linux/Debian/Sid/AMD64 with packages ii libgtk-3-0:amd64 3.3.16-1 GTK+ graphical user interface library ii libgtkmm-3.0-1 3.2.0-1 C++ wrappers for GTK+ (shared libraries) ii libgtkmm-3.0-dev 3.2.0-1 C++ wrappers for GTK+ (development files) ii libgtksourceview-3.0-0 3.2.3-2 shared libraries for the GTK+ syntax highlighting widget ii libgtksourceview-3.0-dev 3.2.3-2 development files for the GTK+ syntax highlighting widget ii libgtksourceviewmm-3.0-0 3.2.0-1 C++ binding of GtkSourceView ii libgtksourceviewmm-3.0-dev 3.2.0-1 C++ binding of GtkSourceView - development files Xorg server with fglrx AMD proprietary driver Regards
Notice that the sensitive rectangle is correctly located and appears as a white borderless cleared rectangle, but the button widget "image" (i.e. appearance) is probably shifted right by the pixel width of the numberring gutter. [I don't see well enough to count the pixels, it is just my feeling). Anyway, it does not look right. Nor does it "feel" good (try to "click" the anchored button, and click also nearby). Maybe it is more a GtkSourceView bug than an Gsv::View one... Cheers
I would place a bet that this is a bug in C library as such errors rather happens somewhere in the C code instead of C++ thin library.
I meant - C++ thin wrapper.
Should I report the bug elsewhere myself, or will it be "propagated"?
If this is really a bug in C library then I will just reassign this bug to gtksourceview.
Created attachment 210246 [details] C example. Attached a C example that shows similar problem. Reassigning to gtksourceview.
The bug stays if replacing the button with a label.
Created attachment 210415 [details] C plain Gtk+ example. Attached Gtk+ C example showing the same problem. To imitate left gutter I used gtk_text_view_set_border_window_size. The button is misplaced.
Reassigning to Gtk+.
Created attachment 211142 [details] [review] Fixes drawing of anchored widgets in GtkTextView. Attaching a patch fixing the issue. Hope that commit message explains this fix well enough.
Should be fixed with http://git.gnome.org/browse/gtk+/commit/?id=df37446f9b4116887865b7ecfddeb535fbc0eacb