Fix regression for timestamp handling for Xwayland windows

Authored by graesslin on May 6 2017, 5:54 PM.



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

Test Plan

TestShade works again, testX11TimestampUpdate still works

Diff Detail

R108 KWin
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.May 6 2017, 5:54 PM
Restricted Application added a project: KWin. · View Herald TranscriptMay 6 2017, 5:54 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript

@luebking can you have a look?

luebking accepted this revision.May 6 2017, 8:17 PM

Matter of semantics only (if you would want to use the XCB_CURRENT_TIME symbol wrt backend abstraction matters and readability - the invalidity isn't implicitly explained, maybe read as bool "if (timestamp && ...") but I'm out of position for an informed comment on this.

This revision is now accepted and ready to land.May 6 2017, 8:17 PM
This revision was automatically updated to reflect the committed changes.