[wayland] Don't honor the idle inhibitor object if the surface is not visible
Needs ReviewPublic

Authored by zzag on Tue, Dec 4, 11:35 AM.

Details

Reviewers
None
Group Reviewers
KWin
Summary

Currently, our implementation of zwp_idle_inhibitor_v1 is not fully
spec-compliant. If the associated surface is not visible, we still
honor the idle inhibitor object.

This change addresses those spec-compliance issues. If a surface is
minimized or it's not on the current virtual desktop, then the
associated inhibitor object won't be honored by KWin.

Diff Detail

Repository
R108 KWin
Branch
idle-inhibit-spec-compliant
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5715
Build 5733: arc lint + arc unit
zzag created this revision.Tue, Dec 4, 11:35 AM
Restricted Application added a project: KWin. · View Herald TranscriptTue, Dec 4, 11:35 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Tue, Dec 4, 11:35 AM
graesslin added inline comments.
idle_inhibition.cpp
113

You could use Workspace::forEachAbstractClient instead. You probably can get this to a one liner in the connect through std::bind.

idle_inhibition.h
60

You don't need the Q_SLOTS any more with the new connect syntax.

zzag updated this revision to Diff 46850.Tue, Dec 4, 5:22 PM

Use Workspace::forEachAbstractClient.

zzag added inline comments.Tue, Dec 4, 5:22 PM
idle_inhibition.h
60

Yes, I know, I just prefer to be explicit.

zzag marked 3 inline comments as done.Tue, Dec 4, 5:23 PM
graesslin added inline comments.Tue, Dec 4, 6:34 PM
idle_inhibition.cpp
114

I don't think we need to cast here at all. AbstractClient has a surface() as well.

zzag updated this revision to Diff 46858.Tue, Dec 4, 7:10 PM

Use more AbstractClient.

zzag marked an inline comment as done.Tue, Dec 4, 7:11 PM
zzag planned changes to this revision.Wed, Dec 5, 8:48 AM

Don't honor the idle inhibitor if the client leaves the current virtual desktop.

zzag updated this revision to Diff 46881.Wed, Dec 5, 9:18 AM

Don't honor the idle inhibitor if the client leaves the current virtual desktop.

(I hope that all cases when a client can become invisible were taken into account)