summaryrefslogtreecommitdiff
path: root/dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
commitb24bd25253fe093f722ab576d29fdc41d04cb1ee (patch)
tree0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch
parent121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff)
gentoo resync : 02.08.2019
Diffstat (limited to 'dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch')
-rw-r--r--dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch b/dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch
new file mode 100644
index 000000000000..8d4378243412
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch
@@ -0,0 +1,39 @@
+From a4e6f88f50d1a1dd56df77ce8b07b98aceb20ddc Mon Sep 17 00:00:00 2001
+From: David Edmundson <davidedmundson@kde.org>
+Date: Sun, 23 Jun 2019 13:25:16 +0200
+Subject: [PATCH] Client: Reset frame callback timer when hiding a window
+
+If we hide a window whilst a compositor has a pending frame to show,
+it's possible the compositor will not render the frame and not return
+the callback.
+
+If this happens on the next window expose we can be left with
+mFrameCallbackTimedOut still true causing isExposed() to remain false
+and us to not send the next buffer when we later show the window again.
+
+Change-Id: I507410415d1a930fd5fa736412055e68fdf6c1d3
+Reviewed-by: Johan Helsing <johan.helsing@qt.io>
+---
+ src/client/qwaylandwindow.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index 7c8ecadaa..2b243bc44 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -254,6 +254,13 @@ void QWaylandWindow::reset(bool sendDestroyEvent)
+ mFrameCallback = nullptr;
+ }
+
++ int timerId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1);
++ if (timerId != -1) {
++ killTimer(timerId);
++ }
++ mWaitingForFrameCallback = false;
++ mFrameCallbackTimedOut = false;
++
+ mMask = QRegion();
+ mQueuedBuffer = nullptr;
+ }
+--
+2.16.3