https://bugs.kde.org/show_bug.cgi?id=377901

Martin Gräßlin <mgraess...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |5.8.7
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://commits.kde.org/kwi
                   |                            |n/0bec9ad7337536e319c17c568
                   |                            |4d97e1156399fdb

--- Comment #16 from Martin Gräßlin <mgraess...@kde.org> ---
Git commit 0bec9ad7337536e319c17c5684d97e1156399fdb by Martin Gräßlin.
Committed on 03/05/2017 at 19:36.
Pushed by graesslin into branch 'Plasma/5.8'.

Improve the x11 timestamp handling

Summary:
So far KWin only updated the x11 timestamp if the new timestamp is larger
than the existing one. While this is a useful thing it creates problems
when the 32 bit msec based time stamp wraps around which happens after
running an X server for 49 days. After the timestamp wrapped around KWin
would not update the timestamp any more and thus some calls might fail.
Most prominent victims are keyboard and pointer grab which fails as the
timestamp is either larger than the server timestamp or smaller than the
last grab timestamp.

Another problem related to timestamp handling is KWin getting broken by
wrong timestamps sent by applications. A prominent example is clusterssh
which used to send a timestamp as unix time which is larger than the
x timestamp and thus our timestamp gets too large.

This change addresses these problems by allowing to reset the timestamp.
This is only used from updateXTime (which is normally invoked before we
do things like grabKeyboard). Thus we make QX11Info::getTimestamp the
ultimate trusted source for timestamps.
Related: bug 348569
FIXED-IN: 5.8.7

Test Plan: As I cannot wait 50 days: unit tests for the two conditions added.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5704

M  +11   -0    autotests/CMakeLists.txt
A  +123  -0    autotests/test_x11_timestamp_update.cpp     [License: GPL (v2)]
M  +6    -2    main.h
M  +1    -1    utils.cpp
M  +3    -3    utils.h

https://commits.kde.org/kwin/0bec9ad7337536e319c17c5684d97e1156399fdb

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to