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 672544 - Anchored widgets inside GtkTextView are drawn out of place when GTK_TEXT_WINDOW_LEFT GdkWindow has nonzero width.
Anchored widgets inside GtkTextView are drawn out of place when GTK_TEXT_WIND...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 673839
 
 
Reported: 2012-03-21 12:16 UTC by Basile Starynkevitch
Modified: 2012-04-10 14:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case in C++ (1.90 KB, text/x-c++src)
2012-03-21 12:16 UTC, Basile Starynkevitch
  Details
C example. (2.97 KB, text/x-c++src)
2012-03-21 14:56 UTC, Krzesimir Nowak
  Details
C plain Gtk+ example. (2.69 KB, text/plain)
2012-03-23 12:46 UTC, Krzesimir Nowak
  Details
Fixes drawing of anchored widgets in GtkTextView. (3.25 KB, patch)
2012-04-02 15:42 UTC, Krzesimir Nowak
none Details | Review

Description Basile Starynkevitch 2012-03-21 12:16:53 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
Comment 1 Basile Starynkevitch 2012-03-21 13:15:50 UTC
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
Comment 2 Krzesimir Nowak 2012-03-21 13:36:44 UTC
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.
Comment 3 Krzesimir Nowak 2012-03-21 13:37:13 UTC
I meant - C++ thin wrapper.
Comment 4 Basile Starynkevitch 2012-03-21 13:41:13 UTC
Should I report the bug elsewhere myself, or will it be "propagated"?
Comment 5 Krzesimir Nowak 2012-03-21 13:44:23 UTC
If this is really a bug in C library then I will just reassign this bug to gtksourceview.
Comment 6 Krzesimir Nowak 2012-03-21 14:56:06 UTC
Created attachment 210246 [details]
C example.

Attached a C example that shows similar problem. Reassigning to gtksourceview.
Comment 7 Basile Starynkevitch 2012-03-23 12:29:51 UTC
The bug stays if replacing the button with a label.
Comment 8 Krzesimir Nowak 2012-03-23 12:46:16 UTC
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.
Comment 9 Krzesimir Nowak 2012-03-23 12:56:28 UTC
Reassigning to Gtk+.
Comment 10 Krzesimir Nowak 2012-04-02 15:42:21 UTC
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.
Comment 11 Benjamin Otte (Company) 2012-04-07 11:06:23 UTC
Should be fixed with http://git.gnome.org/browse/gtk+/commit/?id=df37446f9b4116887865b7ecfddeb535fbc0eacb