Bug 162773 - settings from kwinrulesrc don't get applied
Summary: settings from kwinrulesrc don't get applied
Status: RESOLVED DUPLICATE of bug 187539
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-28 23:48 UTC by Armin Berres
Modified: 2012-03-11 05:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
a created kwinrulesrc (538 bytes, text/plain)
2008-05-28 23:50 UTC, Armin Berres
Details
A screenshot showing what is going wrong (389.04 KB, image/png)
2008-12-01 13:59 UTC, Armin Berres
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Armin Berres 2008-05-28 23:48:58 UTC
Version:            (using Devel)
Installed from:    Compiled sources

When I change the "Special Application Settings" of an Application, like the initial desktop, the settings gets written to .kde4/share/config/kwinrulesrc just fine. When I reopen the dialog I don't see the setting anymore (everything unchecked again) and what's even worse, kwin doesn't apply these settings.
As far as I can tell the written kwinrulesrc looks fine. Attached you can find an example kwinrc with initial desktop settings for konsole and iceweasel.

This worked for quite some time with snapshots from svn, but since 4.0.72 or 4.0.74 I encounter this bug. Right now I'm running beta1.
Comment 1 Armin Berres 2008-05-28 23:50:00 UTC
Created attachment 24986 [details]
a created kwinrulesrc
Comment 2 Lubos Lunak 2008-06-10 14:48:01 UTC
Works perfectly fine here. What are the exact steps to reproduce with a fresh user?

Comment 3 Lubos Lunak 2008-07-09 15:16:28 UTC
Waiting for response.
Comment 4 Armin Berres 2008-08-03 09:06:11 UTC
Sorry for the delay, I spent the last weeks in China.

I just upgraded another notebook from KDE 3.5.9 to KDE 4.1 (with a completely fresh ~/.kde4) and can reproduce the problem more or less.
Here the exact steps: Right click on the window tile bar > Advanced > Special Application Settings... > Change some settings, e.g. the initial desktop. Now close the dialog and reopen it. The changed settings will be gone.

What I noticed now: Setting the startup desktop for iceweasel works fine (IIRC it didn't work on the other box I tried), in ~/.kde4/share/config/kwinrulesrc I find a section like this:
[4]
Description=Application settings for iceweasel
clientmachine=bluefire
clientmachinematch=0
desktop=2
desktoprule=3
types=4294967295
wmclass=navigator iceweasel
wmclasscomplete=true
wmclassmatch=1

When I try this with konsole the settings are gone and kwin always adds one entry in ~/.kde4/share/config/kwinrulesrc.

[1]
Description=Application settings for konsole
clientmachine=bluefire
clientmachinematch=0
desktop=4
desktoprule=3
types=4294967295
wmclass=konsole
wmclasscomplete=false
wmclassmatch=1

[2]
Description=Application settings for konsole
clientmachine=bluefire
clientmachinematch=0
desktop=3
desktoprule=3
types=4294967295
wmclass=konsole
wmclasscomplete=false
wmclassmatch=1

[3]
Description=Application settings for konsole
clientmachine=bluefire
clientmachinematch=0
desktop=1
desktoprule=3
types=4294967295
wmclass=konsole
wmclasscomplete=false
wmclassmatch=1

The same happens with Skype.
The difference I see between a working and a non-working section is wmclasscomplete=true vs. wmclasscomplete=false.
Comment 5 Lubos Lunak 2008-08-05 16:55:10 UTC
Works perfectly fine here with Konsole and following the given steps.
Comment 6 Armin Berres 2008-11-30 01:17:27 UTC
So, the case is getting funny.
It seems as if the settings are stored and applied correctly. For _some_ applications, right now e.g. Akregator, "Right click on the window tile bar > Advanced > Special Application Settings..." shows the correct setting, but it is grayed out and not active.

Right now I stumbled over "Right click on the window tile bar > Configure Window Behavior > Window-Specific" and what can I see: All my settings.

Don't ask me, what I am doing differently than you.
Comment 7 lucas 2008-11-30 05:34:04 UTC
The last comment you supplied is the proper behaviour. Special application settings have grayed out settings if you specified special window settings.

I cannot reproduce following the above steps either.
Comment 8 Armin Berres 2008-12-01 13:59:04 UTC
So, let me try a last time to show you what's my problem. If you still don't see a bug I#ll shut up ;)
Attached you can find a screenshot. There you can see what happens after setting a default setting for Iceweasel, Sype and two times for Akregator.

For Iceweasel everything is fine, for Skype and Akregator their settings dosn't show up in their "Kwin_rules_dialog". As you can see the entry in kwinrulesrc got duplicated after i tried to apply the setting a second time.
Comment 9 Armin Berres 2008-12-01 13:59:29 UTC
Created attachment 28977 [details]
A screenshot showing what is going wrong
Comment 10 Armin Berres 2009-07-23 12:29:44 UTC
Bug is still there (with 4.3 RC2). And it seems I am not alone. Today in IRC:

.:06:22:03:.       jaggz1| in the window settings "Configure settings specifically for a window" -- when I make a new one it doesn't save anymore
.:06:22:13:.       jaggz1| I have one there from months ago, but I can't seem to make a new one for another app
.:06:22:40:.       jaggz1| I get the dialoge, detect the window, set settings, etc.  It's there when I exit that, but when I close the Control Module and come back to it it's gone
Comment 11 Thomas Lübking 2009-07-23 13:07:37 UTC
i'd say when creating the rules you apply to strict filters?

this said it seems "match whole window class" is erroneously /not/ checked (even if i selected in the detection dialog)

in case the settings would not show up in the general "Configure
Window Behavior > Window-Specific" dialog (like #10 seems to indicate) i'd blame lacking write permissions on the config file or (less likely) confusion about the "~/.kde" vs. "~/.kde4" path (for whatever reason...)
Comment 12 Armin Berres 2009-07-23 14:22:22 UTC
I am not creating filters manually, just via "Right click on the window tile bar >
Advanced > Special Application Settings...", so at least it is not me, creating to strict filter.

Yep, I can confirm that "match whole window class" is not stored/read correctly. May this be the issue? Reading writing seems to have problems, see #8 and the attached screenshot.
Comment 13 Thomas Lübking 2009-07-23 15:36:27 UTC
> Yep, I can confirm that "match whole window class" is not stored/read
> correctly. May this be the issue?
I wasn't takling about storing/reading, but transferring it from the detection dialog - and was probably wrong about that as well (well, semi - "use" and "match" do not exactly suggest the same...)

If you've got issues writing/re-reading settings you should "strace kcmshell4 kwinrules" and grep the output for "kwinrules" to figure whether different files are written/read,

BUT:
regarding the screenshot i'd stay with my "strict filter" theory.
Enter the window tab of e.g. the skype dialog, press the detect button, select the wished option and confirm. then watch if the filters (also in "window extra") change.
Comment 14 Jaime Torres 2010-10-10 09:39:51 UTC
Armin, could you check again with a recent KDE SC (4.5.2 or later)?
I've tried with akregator, firefox, (no skype here) and they keep the specific preferences well.
Comment 15 Thomas Lübking 2012-03-11 05:53:54 UTC
konsole is no way a problem here, but again the word "skype" pops out ;-)
marking as dupe, there's certainly a pattern.

*** This bug has been marked as a duplicate of bug 187539 ***