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 27 28 29 30 31 32 33 34 35 36 37
|
From 64e46b80e621e48f6e7fc9eff555c320d327457b Mon Sep 17 00:00:00 2001
From: Noah Davis <noahadvs@gmail.com>
Date: Fri, 30 May 2025 15:13:57 -0400
Subject: [PATCH] Workaround QWindow::screen being wrong with some fractional
DPR screen layout combinations
Caused the selection editor to select on the wrong screen.
BUG: 502047
(cherry picked from commit f407154111eb6fd3f8c0cc3d80eb3e6c0a241be7)
Co-authored-by: Noah Davis <noahadvs@gmail.com>
---
src/Gui/CaptureWindow.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/Gui/CaptureWindow.cpp b/src/Gui/CaptureWindow.cpp
index f5178ca55..fc4509cf3 100644
--- a/src/Gui/CaptureWindow.cpp
+++ b/src/Gui/CaptureWindow.cpp
@@ -50,6 +50,11 @@ CaptureWindow::CaptureWindow(Mode mode, QScreen *screen, QQmlEngine *engine, QWi
this, &CaptureWindow::syncGeometryWithScreen);
syncGeometryWithScreen();
Q_EMIT screenToFollowChanged();
+ // BUG: https://bugs.kde.org/show_bug.cgi?id=502047
+ // Workaround window choosing wrong screen with some fractional DPR screen layout combinations.
+ connect(this, &QWindow::screenChanged, this, [this] {
+ syncGeometryWithScreen();
+ });
// sync visibility
connect(this, &QWindow::visibilityChanged, this, [this](QWindow::Visibility visibility){
--
GitLab
|