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

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

Details

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 5698
Build 5716: arc lint + arc unit
zzag created this revision.Dec 4 2018, 11:35 AM
Restricted Application added a project: KWin. · View Herald TranscriptDec 4 2018, 11:35 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Dec 4 2018, 11:35 AM
graesslin added inline comments.
idle_inhibition.cpp
112

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.Dec 4 2018, 5:22 PM

Use Workspace::forEachAbstractClient.

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

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

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

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

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

Use more AbstractClient.

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

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

zzag updated this revision to Diff 46881.Dec 5 2018, 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)

davidedmundson accepted this revision.Jan 11 2019, 12:45 PM
This revision is now accepted and ready to land.Jan 11 2019, 12:45 PM
This revision was automatically updated to reflect the committed changes.