[server] Cache current mode
ClosedPublic

Authored by romangg on Aug 27 2019, 1:33 PM.

Details

Summary

Instead of looping over all modes for retrieving current mode data copy it
to a separate variable.

Test Plan

KWin auto tests pass and KScreen in Wayland nested session shows correct
information.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Aug 27 2019, 1:33 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 27 2019, 1:33 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
romangg requested review of this revision.Aug 27 2019, 1:33 PM
davidedmundson accepted this revision.Aug 28 2019, 11:07 AM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
src/server/outputdevice_interface.cpp
143

we can also just use currentMode directly here and remove the loop above

This revision is now accepted and ready to land.Aug 28 2019, 11:07 AM
romangg added inline comments.Aug 28 2019, 11:09 AM
src/server/outputdevice_interface.cpp
143

Thanks. Will put it into a second diff.

romangg marked 2 inline comments as done.Aug 28 2019, 12:33 PM
romangg added inline comments.
src/server/outputdevice_interface.cpp
143

See D23535

This revision was automatically updated to reflect the committed changes.
romangg marked an inline comment as done.