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 737825 - gtk_cairo_create() returns a cairo context which is too severely clipped.
gtk_cairo_create() returns a cairo context which is too severely clipped.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-10-03 07:54 UTC by Jean Bréfort
Modified: 2014-10-07 11:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample code showin the issue (1.06 KB, text/plain)
2014-10-05 05:42 UTC, Jean Bréfort
Details

Description Jean Bréfort 2014-10-03 07:54:49 UTC
This breaks both gnumeric and abiword.
In gnumeric, I could testn, and for a widget whose allocated size is that the clip extents 1367x549, the clip extents are from 0,0 (which is correct) to 1305,350 (which is bad). This is new with gtk+-3.14.

Not sure it is specific to the X11 backend though.
Comment 1 Matthias Clasen 2014-10-03 15:53:54 UTC
Can you create a testcase that shows this problem, perhaps ?
Comment 2 Jean Bréfort 2014-10-03 16:01:03 UTC
If you have gnumeric at hand, select some cells including some at the widow bottom, then type Ctrl+C, you'll see the ant walking only near the widget top. Otherwise, I might be able to create a simple testcase during the week-end.
Comment 3 Jean Bréfort 2014-10-05 05:42:41 UTC
Created attachment 287749 [details]
Sample code showin the issue

Looks like that the clip region is first initialized with the correct size, but then intersected with the actual widget area before being translated. The unpainted area has the same height that the button. If the button is moved to bottom, the whole area will be painted.
Comment 4 Jean Bréfort 2014-10-05 06:05:14 UTC
The clipped region is actually translated twice by -window->x, -window->y. The first time at gdkwindow.c:927, and the second in gdk_cairo_create(), line 3070. This can only work properly if both window->x and window->y are 0.
Comment 5 Jean Bréfort 2014-10-05 06:30:54 UTC
Hmm, looks a bit more involved. If I "fix" the above issue, things work for my widget, but break all others.
Comment 6 Benjamin Otte (Company) 2014-10-06 20:36:32 UTC
I've pushed a fix to 3.14 and master that fixes this.

Keep in mind that the testcase only works on X11 and has no chance of ever
working on Wayland ue to double buffering.
Comment 7 Jean Bréfort 2014-10-07 11:34:31 UTC
Thanks for fixing. I know that this will not work on Wayland. Gnumeric might be easily fixed, abiword might just die.