Fix regression for timestamp handling for Xwayland windows
AbandonedPublic

Authored by graesslin on May 6 2017, 5:04 AM.

Details

Reviewers
sebas
Group Reviewers
KWin
Plasma
Summary

Change 0bec9ad7337536e319c17c5684d97e1156399fdb introduced a regrssion
on Wayland. On Wayland getTimestamp always returns 0, thus the X11
timestamp gets reset again and again. This results in broken interaction
for Xwayland windows as the broken unit tests show.

This change addresses the regression by ignoring a value of 0.
It means the addressed bug is still present on Wayland for X11 windows
as the timestamp doesn't get updated properly. This requires further
changes.

Test Plan

testShade and testPlasmaWindow succeed again

Diff Detail

Repository
R108 KWin
Branch
fix-timestamp-regression-5.8
Lint
No Linters Available
Unit
No Unit Test Coverage
graesslin created this revision.May 6 2017, 5:04 AM
Restricted Application added a project: KWin. · View Herald TranscriptMay 6 2017, 5:04 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript

0L is XCB_CURRENT_TIME iow "kinda invalid", so it's sane to block that in setX11Time()

Also: a conditional early return? In a four line function? Really? ;-P

sebas accepted this revision.May 6 2017, 1:17 PM
This revision is now accepted and ready to land.May 6 2017, 1:17 PM
graesslin abandoned this revision.May 6 2017, 4:56 PM

Going for Thomas's suggestion to check in setX11Time

New version at D5731