Port window specific rules dialog to DBus
ClosedPublic

Authored by graesslin on Dec 23 2018, 8:23 AM.

Details

Summary

The dialog invoked through user actions menu takes the internal uuid as
command line argument which allows to query the required information
from KWin instead of using X11.

This allows to enable the system for Wayland windows.

In order to replace the usage of ClientMachine in the rules dialog the
dbus interface is extended by a value whether the window is on the
localhost. This is exposed through a virtual method on toplevel which is
overridden in ShellClient and there always returning true.

Test Plan

Run a nested Wayland and opened the dialog on a wayland window

Diff Detail

Repository
R108 KWin
Branch
window-specific-dbus
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6280
Build 6298: arc lint + arc unit
graesslin created this revision.Dec 23 2018, 8:23 AM
Restricted Application added a project: KWin. · View Herald TranscriptDec 23 2018, 8:23 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Dec 23 2018, 8:23 AM
zzag added a subscriber: zzag.Dec 23 2018, 3:52 PM

It looks like the rules dialog no longer shows the old rules, e.g.

though the old rules still work.

kcmkwin/kwinrules/main.cpp
75–77

Shouldn't these ones call toLower()?

zzag added a comment.Dec 23 2018, 5:31 PM

Also, it looks like some rules are not working with wayland clients(e.g. Position, Size, etc). Nothing looks suspicious in ~/.config/kwinrulesrc, so that's probably a bug in KWin core.

In D17750#381419, @zzag wrote:

Also, it looks like some rules are not working with wayland clients(e.g. Position, Size, etc). Nothing looks suspicious in ~/.config/kwinrulesrc, so that's probably a bug in KWin core.

Not all rules are implemented yet.

zzag added a comment.Dec 23 2018, 7:00 PM

Not all rules are implemented yet.

Oh, okay. Thank you for clarification. :-)

graesslin updated this revision to Diff 48092.Dec 23 2018, 7:03 PM

Use toLower - for X11 windows it worked now

zzag accepted this revision.Dec 23 2018, 7:13 PM

Cool! Everything looks good to me. Please wait for David's review.

kcmkwin/kwinrules/main.cpp
280–282

One empty line would be enough. :-)

This revision is now accepted and ready to land.Dec 23 2018, 7:13 PM
This revision was automatically updated to reflect the committed changes.