[effects/dimscreen] Make it work on Wayland
ClosedPublic

Authored by zzag on Oct 19 2018, 1:10 PM.

Details

Summary

There is no concept of managed windows in Wayland, so every time we call
managed() on a Wayland client, it will return false. We need to call
that method only for X11 clients.

The weirdest part of this patch is missing resource names in window
classes of authentication agents on Wayland. The reason for that is
KWayland can't read the exe symlink(/proc/<pid>/exe) because the
authentication agents run as root.

CCBUG: 398100

Test Plan

Before:

After:

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Oct 19 2018, 1:10 PM
Restricted Application added a project: KWin. · View Herald TranscriptOct 19 2018, 1:10 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Oct 19 2018, 1:10 PM
davidedmundson accepted this revision.Oct 19 2018, 1:18 PM
davidedmundson added a subscriber: davidedmundson.

Please fix comment before pushing

effects/dimscreen/dimscreen.cpp
37

// they run as root

Polkit-kde-authentication-agent-1 does not run as root.
It just has magic flags that disable /proc inspection

This revision is now accepted and ready to land.Oct 19 2018, 1:18 PM
zzag added inline comments.Oct 19 2018, 1:20 PM
effects/dimscreen/dimscreen.cpp
37

I ran ps and it was "root root". Thanks.

This revision was automatically updated to reflect the committed changes.