Bug 403305

Summary: "Remember" rules do not work with Wayland clients
Product: [Plasma] kwin Reporter: Vlad Zahorodnii <vlad.zahorodnii>
Component: rulesAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: bugseforuns, erin-kde, kde, nate, takuya
Priority: NOR Flags: vlad.zahorodnii: Wayland+
vlad.zahorodnii: X11-
vlad.zahorodnii: ReviewRequest+
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://phabricator.kde.org/D18550
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Vlad Zahorodnii 2019-01-17 12:37:07 UTC
STEPS TO REPRODUCE
1. Open Konsole's Special Window Settings;
2. Change the keep above rule to "Remember";
3. Set the keep above state for the Konsole window;
4. Close the Konsole window;
5. Open Konsole again.

OBSERVED RESULT
The new Konsole window is not kept above other windows.

EXPECTED RESULT
The Konsole window is kept above other windows.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.14.90
KDE Frameworks Version: 5.54
Qt Version: 5.12
Comment 1 David Edmundson 2019-01-17 12:48:50 UTC
Ack. 

There's a lot of ShellClient that we're doing too early for XDGShell, ideally we should do a lot of stuff after the client has committed their initial state.
Comment 2 Vlad Zahorodnii 2019-01-17 12:55:26 UTC
(In reply to David Edmundson from comment #1)
> There's a lot of ShellClient that we're doing too early for XDGShell
Well, one can have a generic rule that applies to all windows. So, we have to apply rules once a shell client is created and once shell client gets title and window class.
Comment 3 Vlad Zahorodnii 2019-01-17 12:56:17 UTC
s/ohce/when/
Comment 4 Martin Flöser 2019-01-17 15:49:08 UTC
I do not know how remember rules are supposed to work. They are certainly not yet hooked up for ShellClient. Just like many other aspects of rules.
Comment 5 Vlad Zahorodnii 2019-01-17 16:02:16 UTC
Maybe that's unrelated question, but... in rules.cpp we have READ_FORCE_RULE and READ_SET_RULE, what's the difference between "force" and "set" rules? So far it looks like the former can be only forced, while the latter can be forced as well "remembered".
Comment 6 Martin Flöser 2019-01-17 17:49:55 UTC
That's also a mystery I never uncovered.
Comment 7 Vlad Zahorodnii 2019-07-09 12:16:25 UTC
Git commit be48d36349e56da9eaeb377a3eabad7058458965 by Vlad Zagorodniy.
Committed on 09/07/2019 at 12:13.
Pushed by vladz into branch 'master'.

[autotests] Rewrite testShellClientRules

Summary:
Currently, the test doesn't verify that each rule does what it should,
e.g. a force rule is a force rule and not force temporarily, etc. This
as it turns out hides some bugs, e.g. all remember rules do not work,
forced window shortcuts can't be released, etc.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18464

M  +2745 -267  autotests/integration/shell_client_rules_test.cpp
M  +18   -18   rules.h

https://commits.kde.org/kwin/be48d36349e56da9eaeb377a3eabad7058458965
Comment 8 Patrick Silva 2020-02-20 12:13:28 UTC
duplicate of bug 409797?
Comment 9 Nate Graham 2020-02-20 21:10:37 UTC
*** Bug 409797 has been marked as a duplicate of this bug. ***