Call workspaceEvent and updateX11Time only once per event
ClosedPublic

Authored by romangg on Jul 18 2018, 5:18 PM.

Details

Summary

On Wayland processXcbEvents calls workspaceEvents and updateX11Time but this
is already done in the native event filter.

Test Plan

Manual test shows Xwayland still works and constant calls to
XcbEventFilter::nativeEventFilter are processed.

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.
romangg created this revision.Jul 18 2018, 5:18 PM
Restricted Application added a project: KWin. · View Herald TranscriptJul 18 2018, 5:18 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Jul 18 2018, 5:18 PM
romangg updated this revision to Diff 38034.Jul 18 2018, 5:23 PM
  • Cleanup and remove second updateX11Time call also
romangg retitled this revision from Call workspaceEvent only once per event to Call workspaceEvent and updateX11Time only once per event.Jul 18 2018, 5:24 PM
romangg edited the summary of this revision. (Show Details)
davidedmundson accepted this revision.Jul 19 2018, 12:59 PM
davidedmundson added a subscriber: davidedmundson.

Makes sense, code happened because the X11 filter was added afterwards: c8ebcf4ca2

main_wayland.cpp
226

It wasn't doing it more than once per event previously, we have this continue here if it was handled.

But you're right it's redundant.

This revision is now accepted and ready to land.Jul 19 2018, 12:59 PM
romangg added inline comments.Jul 19 2018, 4:36 PM
main_wayland.cpp
226

True in case the event is handled, but in case the event is not handled the code tried unnecessarily a second time to handle it (and updateX11Time was called twice always).

This revision was automatically updated to reflect the committed changes.