Paste P529

(An Untitled Masterwork)
ActivePublic

Authored by zzag on Jan 27 2020, 12:28 PM.
From 2bab8971518779ad3a841ecf74fda74d30ac94f5 Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Mon, 27 Jan 2020 13:57:53 +0200
Subject: [PATCH] [x11] Print a warning message if we're about to render a
client un-synchronized
---
x11client.cpp | 8 +++++++-
x11client.h | 1 +
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/x11client.cpp b/x11client.cpp
index d5f6af8a9..1e3bb9852 100644
--- a/x11client.cpp
+++ b/x11client.cpp
@@ -2875,6 +2875,12 @@ void X11Client::handleSync()
addRepaintFull();
}
+void X11Client::handleExpiredSync()
+{
+ qCWarning(KWIN_CORE, "0x%x will be rendered unsynchronized because pending sync request has expired", window());
+ performMoveResize();
+}
+
void X11Client::move(int x, int y, ForceGeometry_t force)
{
const QPoint framePosition(x, y);
@@ -4754,7 +4760,7 @@ void X11Client::doResizeSync()
{
if (!syncRequest.timeout) {
syncRequest.timeout = new QTimer(this);
- connect(syncRequest.timeout, &QTimer::timeout, this, &X11Client::performMoveResize);
+ connect(syncRequest.timeout, &QTimer::timeout, this, &X11Client::handleExpiredSync);
syncRequest.timeout->setSingleShot(true);
}
if (syncRequest.counter != XCB_NONE) {
diff --git a/x11client.h b/x11client.h
index 212120869..def23aaeb 100644
--- a/x11client.h
+++ b/x11client.h
@@ -324,6 +324,7 @@ public:
return syncRequest;
}
void handleSync();
+ void handleExpiredSync();
static void cleanupX11();
--
2.25.0
zzag created this paste.Jan 27 2020, 12:28 PM
zzag created this object in space S1 KDE Community.