diff --git a/utils.cpp b/utils.cpp --- a/utils.cpp +++ b/utils.cpp @@ -84,7 +84,13 @@ // NOTE: QX11Info::getTimestamp does not yet search the event queue as the old // solution did. This means there might be regressions currently. See the // documentation above on how it should be done properly. - kwinApp()->setX11Time(QX11Info::getTimestamp(), Application::TimestampUpdate::Always); + const auto timestamp = QX11Info::getTimestamp(); + if (timestamp == 0) { + // 0 indicates an error when trying to get the timestamp. Don't update to that + // TODO: implement getTimestamp on Wayland + return; + } + kwinApp()->setX11Time(timestamp, Application::TimestampUpdate::Always); } static int server_grab_count = 0;