Bug 207670 - Window specific rules not applied to title matched windows
Summary: Window specific rules not applied to title matched windows
Status: RESOLVED DUPLICATE of bug 220227
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 217123 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-17 10:27 UTC by Magnus Aagaard Sørensen
Modified: 2012-03-17 00:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Aagaard Sørensen 2009-09-17 10:27:03 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    Unspecified Linux

I'm trying to run two instances of wine, one on each monitor of my setup. I start the two instances with:
"wine explorer /desktop=eve1,1680x1050 application"
"wine explorer /desktop=eve2,1280x1050 application"
so that each window has a distinct title, which I then can match in the rules settings. During initial configuration, the windows behave as expected, the problem is what happens at next launch.

At next launch, no rules are applied to the windows as they open, so their initial position depends on from which monitor I launch the application. In order to get the rules to apply, I:
1) Open the window-specific rules dialogue.
2) Open a random window rule, it doesn't need to be related to the windows/applications in question.
3) Close the the selected rule again without changing anything through the "Ok" button.
4) This unlocks the apply button in the window-specific rules dialogue, I press it.

This now applies some of the rules. The windows get sorted to the right monitors (Ie the position rule is applied), they get the right sizes and the borders are removed, but the final position is off, as their position doesn't get updated after the borders are removed.

To fix this, I have to go through step 1-4 again.

So in summary there are two issues:
1) Getting kwin to apply the custom rules to the initially opened windows.
2) Understanding why the rules have to be applied manually twice when 1) doesn't work.

The problem lies somewhere in the title matching, as the rules get applied if I just let it act on window class, but in this case I obviously can't distinguish between the two windows. I don't know if wine changes the window title after it has launched. Bug 92914 suggests that kwin doesn't dynamically look at the window titles, but I don't know what the current status is as this bug if close to 5 years old.

System info:
Archlinux 64 bit distribution, running with standard kde packages.
Nvidia 8400 graphics card.
2 monitors, 1680x1050 and 1280x1024.

Custom rules:
[1]
Description=(Default) Disable focus stealing prevention for XV
fsplevel=0
fsplevelrule=2
types=4294967295
wmclass=^xv .*
wmclasscomplete=true
wmclassmatch=3

[2]
Description=Eve 1
clientmachine=sakura
clientmachinematch=0
desktop=4
desktoprule=2
fullscreen=false
fullscreenrule=2
noborder=true
noborderrule=2
position=0,0
positionrule=2
size=1680,1050
sizerule=2
title=eve1 - Wine desktop
titlematch=1
wmclass=wine
wmclasscomplete=false
wmclassmatch=1

[3]
Description=Eve 2
clientmachine=sakura
clientmachinematch=0
desktop=4
desktoprule=2
fullscreen=true
fullscreenrule=2
noborder=true
noborderrule=2
position=1680,0
positionrule=2
size=1280,1024
sizerule=2
title=eve2 - Wine desktop
titlematch=1
Comment 1 Martin Flöser 2009-12-19 16:27:03 UTC
*** Bug 217123 has been marked as a duplicate of this bug. ***
Comment 2 Danila Sentiabov 2010-02-14 11:31:51 UTC
This bug is still present in 4.4.0 (openSUSE 11.2/x86_64).
Comment 3 Thomas Lübking 2012-03-17 00:38:21 UTC

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