Evaluate window rules when a shell client is mapped
AbandonedPublic

Authored by zzag on Jan 26 2019, 1:46 PM.

Details

Reviewers
None
Group Reviewers
KWin
Summary

When a ShellClient is created, KWayland has't processed any requests
from the client. So, there won't be useful information that can be
used to match window rules against the client, e.g. app id or the title.

The worst part is that the xdg-shell spec doesn't have restrictions on
when a client can change its app id, i.e nothing prevents a client from
changing its app id while it's still mapped! The proposed change
addresses that issue by applying rules like Apply or Remember only when
the client is unmapped.

This is still not the complete solution. The Size and Maximize rules will
shape further the implementation of window rules for ShellClient. We'd
like to delay sending initial configure event as well compress all state
and size changes caused by window rules.

BUG: 403305

Test Plan

testShellClientRules passes now.

Diff Detail

Repository
R108 KWin
Branch
fix-remember-rules
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7552
Build 7570: arc lint + arc unit
zzag created this revision.Jan 26 2019, 1:46 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 26 2019, 1:46 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jan 26 2019, 1:46 PM
zzag updated this revision to Diff 50322.Jan 26 2019, 1:48 PM

Remove unrelated whitespace change

zzag updated this revision to Diff 50324.Jan 26 2019, 1:51 PM

Remove unrelated changes

zzag updated this revision to Diff 50325.Jan 26 2019, 1:54 PM

Make the diff more nicer

zzag edited the summary of this revision. (Show Details)Jan 26 2019, 2:00 PM
zzag abandoned this revision.Jan 31 2019, 10:18 PM

Once ShellClient tries to send a configure event after the surface is committed, remember rules will work automagically*.

* There are exceptions of course.