Bug 275696 - Oxygen decoration doesn't apply custom gradient rule to libreoffice
Summary: Oxygen decoration doesn't apply custom gradient rule to libreoffice
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: win deco (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-15 09:46 UTC by Benjamin M
Modified: 2011-09-23 12:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin M 2011-06-15 09:46:47 UTC
Version:           unspecified (using KDE 4.6.3) 
OS:                Linux

See http://forum.kde.org/viewtopic.php?f=17&t=95423&sid=4a368ae110e45fb1b5a874142c751ac0&p=197951#p197951

The Oxygen decoration does - most times - not respect that I set a flat gradient for libreoffice-* apps (by window class). It works for any other class that I have specified (for details, see the link). I have specifically tried this with writer, calc and impress. I never had this problem with OpenOffice.org. 

Reproducible: Sometimes

Steps to Reproduce:
Go to System Settings -> Appearance (?) -> Window decorations -> Oxygen and there the settings button. The tab "Window-specific settings" lets you set custom rules for either windows with a certain title or of a certain class. Set it to "class" (not title), choose "flat" (or monochrome or w.e.) for the background style and add the window classes "libreoffice-writer|libreoffice-calc|libreoffice-impress". 

Actual Results:  
The gradient applies only in one of about every ten cases, and I have no idea what makes it work or not. 

Expected Results:  
The flat style gradient should be applied. 

This is on openSUSE 11.4 with KDE 4.6.4 from the 4.6 Release repos.
Comment 1 Hugo Pereira Da Costa 2011-06-15 23:14:25 UTC
Hi Benjamin,

i'll investigate tomorrow. 

For kde 4.7 though, I want to point out I attempted to add "automatic" detection from the decoration whether it should draw the gradient or not (basically based on whether a flag is set by the widget style, when you use oxygen for Qt apps, and oxygen-gtk for Gtk apps, including libreoffice). 

Will keep you posted.
Comment 2 Benjamin M 2011-06-16 09:49:26 UTC
Hey, great to hear! That sounds exciting.
Comment 3 Hugo Pereira Da Costa 2011-06-20 18:10:31 UTC
From my experience, this is due to the fact that the upper/lower case of LibreOffice classname is quite "random" at startup, depending on which application you run, and whether you pass it an argument or not ...

From my testing, using "(l|L)ibre(o|O)ffice" as a regular expression works in all cases. Can you confirm ? And if yes, well, simply close the bug :)

Hugo
Comment 4 Benjamin M 2011-06-20 23:57:25 UTC
I tried your suggested fix and unfortunately, it didn't work. I did notice a pattern though: Any document that I opened (out of six or so), no matter the file type, ignored the window gradient settings. But when I created a new document from within LO writer, that window respected the settings (could this have to do with the title?). So I think you are on the right track!
Comment 5 Benjamin M 2011-06-21 00:09:00 UTC
Well, but opening from within LO writer, but from a template again produces the bug.
Comment 6 jurial_munkey 2011-08-21 07:10:34 UTC
I was having this exact same issue. Putting "(l|L)ibre(o|O)ffice*" [without quotes] as the window class solved it for me. However, it didn't work when I put "(l|L)ibre(o|O)ffice-writer" or any other combination. Only "(l|L)ibre(o|O)ffice*" by itself, as a separate rule, worked.

KDE 4.6.2, Kubuntu 11.04
Comment 7 Hugo Pereira Da Costa 2011-09-23 12:35:27 UTC
ok. So the full issue seems to be about reg-exp and the fancy names for libreoffice.
Besides, for kde4.7 you can set the decoration background painting so that it obeys some hint set by the style, and in the case of oxygen-gtk (or any other style in fact), this would default to "flat" for libreoffice. 

So: closing this bug as fixed.