Bug 286348 - oxygen-gtk seems to use radio button pixmap for field and button edges?
Summary: oxygen-gtk seems to use radio button pixmap for field and button edges?
Status: CLOSED UPSTREAM
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-11 16:11 UTC by JR
Modified: 2012-03-01 15:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
oxygen-gtk display weirdness (89.36 KB, image/png)
2011-11-11 16:11 UTC, JR
Details
patch (1.14 KB, application/octet-stream)
2011-11-12 11:58 UTC, Hugo Pereira Da Costa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JR 2011-11-11 16:11:19 UTC
Created attachment 65528 [details]
oxygen-gtk display weirdness

Version:           unspecified (using KDE 4.7.3) 
OS:                Linux

Kubuntu 11.10 running KDE 4.7.3 from ppas. oxygen-gtk is fresh from git as of today 11/11, commit 6868ab76f239855f7d23d50d88ec92166d4ad5ee.


I probably did something I shouldn't have, but now oxygen-gtk seems to have confused some pixmaps. See the attached screenshot. It affects all users, even new ones.

Reproducible: Couldn't Reproduce

Steps to Reproduce:
1. Start GTK-based program

Actual Results:  
2. It ends up looking weird!

Expected Results:  
2. It should look like a Qt4-based program.

Could not reproduce as I don't know how to undo it first.

It persists even if I downgrade to the repository gtk2-engines-oxygen package, and it doesn't seem to be affecting QtCurve. It affects all users and all GTK programs; oxygen-gtk-demo, Chromium, Firefox, Ex Falso, ...

Is there a pixmap cache I could clear and rebuild? I've tried deleting the contents of ~/.kde/{cache,tmp}-$HOSTNAME both for my user and for root, but it didn't seem to help. I'm not sure if kbuildsycoca4 is relevant in this context, but I've run it with --noincremental and the behavior remains.
Comment 1 Ruslan Kabatsayev 2011-11-11 16:36:51 UTC
What version of gtk and cairo?
Comment 2 Hugo Pereira Da Costa 2011-11-11 17:11:02 UTC
looks good !
seriously, Can't reproduce.
I do suspect issue with cairo.
Seems like our pixmap splitting (in TileSet) is completly broken.

(I have cairo 1.10.2 here, I think, and gtk-2.24.5)
Comment 3 JR 2011-11-11 20:35:38 UTC
GTK libraries are from oneiric main, package version 2.24.6-0ubuntu5.

cairo is from the xorg-edgers ppa though, package version 1.11.3+git20111109.90b2fd34-0ubuntu0ricotz~oneiric0. I can't easily downgrade cairo without aptitude wanting to remove my entire desktop.

I can live with QtCurve for now and play the guinea pig if you have ideas to narrow this down further.
Comment 4 Hugo Pereira Da Costa 2011-11-11 22:42:45 UTC
I tried gtk+-2.24.8 (latest stable from the 2.0 series), and still no issue.

So yeah, most likely the cairo-unstable is the guilty guy.
(from what I can tell, cairo-1.10.2 is the latest stable).

Can you report the bug to them with a link here ? 

In the meanwhile I'll give a shot to unstable cairo tomorrow.

Hugo
Comment 5 Hugo Pereira Da Costa 2011-11-11 23:17:03 UTC
Soo. Tried 1.11.2 -> no problem.
Tried Cairo + pixmap from git: same problem as you.
So Cairo it is. Not much we can do about it. 
Report to them and hope for a fix.
Comment 6 Hugo Pereira Da Costa 2011-11-12 11:58:03 UTC
Created attachment 65548 [details]
patch

guinea pig you said ?
Attached patch fixes it for me.
Can you test and confirm ? (tell me if you need help to apply the patch)
If yes, this points to a problem with cairo_surface_create_for_rectangle
(which I believe ignores the sx and sy parameters).
Would be nice to post to cairo.
Comment 7 Hugo Pereira Da Costa 2011-11-12 11:58:31 UTC
(gee, now I run with cairo and pixman from git. All thrilled)
Comment 8 Hugo Pereira Da Costa 2011-11-12 12:09:06 UTC
PS, to Ruslan
If you look at the code for tileset (see patch above), and at the documentation for cairo_surface_create_for_rectangle

http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-create-for-rectangle

there is a possibility that we abuse the method (to get a copy of a sub-section of a surface), so that we actually should apply the patch no matter what.

But I'm not sure I interpret the doc properly.
You're opinion ?
Comment 9 Ruslan Kabatsayev 2011-11-12 12:21:24 UTC
@Hugo
I don't think we abuse it - we just get a subsurface of "source", and then draw using it. It looks perfectly valid to me. I do believe this bug is cairo's fault, not ours.
Comment 10 Hugo Pereira Da Costa 2011-11-12 12:25:56 UTC
ok. So lets wait and see what the cairo folks make out of it :)
@JR hopefully you shoud be able to use oxygen-gtk in the meanwhile nonetheless.
Comment 11 JR 2011-11-13 23:02:20 UTC
@Hugo
Thanks, with the patch it looks like it should again.

I'll look into filing a cairo bug.
Comment 12 JR 2011-11-13 23:29:02 UTC
Filed as fdo #42889

https://bugs.freedesktop.org/show_bug.cgi?id=42889