hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From a89acc949624097b09baddb21d4c8b4f9d61fd0d Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Thu, 16 Jul 2020 17:18:42 +0800
Subject: [PATCH 11/15] qwaylandshmbackingstore: Ignore resizing with no screen
 
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
 src/client/qwaylandshmbackingstore.cpp | 3 +++
 1 file changed, 3 insertions(+)
 
diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp
index dc7ff67..515ec19 100644
--- a/src/client/qwaylandshmbackingstore.cpp
+++ b/src/client/qwaylandshmbackingstore.cpp
@@ -274,6 +274,9 @@ void QWaylandShmBackingStore::resize(const QSize &size)
     int scale = waylandWindow()->scale();
     QSize sizeWithMargins = (size + QSize(margins.left()+margins.right(),margins.top()+margins.bottom())) * scale;
 
+    if (!QPlatformScreen::platformScreenForWindow(window()))
+        return;
+
     // We look for a free buffer to draw into. If the buffer is not the last buffer we used,
     // that is mBackBuffer, and the size is the same we memcpy the old content into the new
     // buffer so that QPainter is happy to find the stuff it had drawn before. If the new
-- 
2.20.1