[neon/qt/qtbase/Neon/testing] debian: Backport upstream patch to fix a regression that affects Plasma.

Dmitry Shachnev null at kde.org
Tue May 18 11:01:28 BST 2021


Git commit 32592801cce3411e822e3c2ccbaf739e4dcd802c by Dmitry Shachnev.
Committed on 30/09/2020 at 17:57.
Pushed by sitter into branch 'Neon/testing'.

Backport upstream patch to fix a regression that affects Plasma.

See https://mail.kde.org/pipermail/distributions/2020-September/000866.html.

M  +3    -0    debian/changelog
A  +64   -0    debian/patches/emit_geometry_changed.diff
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt/qtbase/commit/32592801cce3411e822e3c2ccbaf739e4dcd802c

diff --git a/debian/changelog b/debian/changelog
index b4ad472..85c77df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 qtbase-opensource-src (5.15.1+dfsg-2) UNRELEASED; urgency=medium
 
+  [ Dmitry Shachnev ]
+  * Backport upstream patch to fix multiscreen-related regression that
+    affects Plasma.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Wed, 30 Sep 2020 20:54:35 +0300
 
diff --git a/debian/patches/emit_geometry_changed.diff b/debian/patches/emit_geometry_changed.diff
new file mode 100644
index 0000000..3490722
--- /dev/null
+++ b/debian/patches/emit_geometry_changed.diff
@@ -0,0 +1,64 @@
+Description: emit QScreen::geometryChanged when the logical DPI changes
+ Add the missing call to QScreenPrivate::emitGeometryChangeSignals()
+ along with an emission of physicalDotsPerInchChanged()
+ since that is calculated from geometry and physical size.
+ .
+ Rearrange the code in
+ QGuiApplicationPrivate::processScreenGeometryChange()
+ to prevent duplicate emissions of geometryChanged(),
+ physicalDotsPerInchChanged() which this change would introduce.
+Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=5c7307775d32ae0a
+Last-Update: 2020-09-30
+
+--- a/src/gui/kernel/qguiapplication.cpp
++++ b/src/gui/kernel/qguiapplication.cpp
+@@ -3162,13 +3162,14 @@ void QGuiApplicationPrivate::processScre
+     bool availableGeometryChanged = e->availableGeometry != s->d_func()->availableGeometry;
+     s->d_func()->availableGeometry = e->availableGeometry;
+ 
+-    if (geometryChanged) {
+-        Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();
++    const Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();
++    if (geometryChanged)
+         s->d_func()->updatePrimaryOrientation();
+ 
+-        emit s->geometryChanged(s->geometry());
++    s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
++
++    if (geometryChanged) {
+         emit s->physicalSizeChanged(s->physicalSize());
+-        emit s->physicalDotsPerInchChanged(s->physicalDotsPerInch());
+         emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch());
+ 
+         if (s->primaryOrientation() != primaryOrientation)
+@@ -3178,8 +3179,6 @@ void QGuiApplicationPrivate::processScre
+             updateFilteredScreenOrientation(s);
+     }
+ 
+-    s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
+-
+     resetCachedDevicePixelRatio();
+ }
+ 
+--- a/src/gui/kernel/qscreen.cpp
++++ b/src/gui/kernel/qscreen.cpp
+@@ -88,6 +88,9 @@ void QScreenPrivate::updateGeometriesWit
+ void QScreenPrivate::emitGeometryChangeSignals(bool geometryChanged, bool availableGeometryChanged)
+ {
+     Q_Q(QScreen);
++    if (geometryChanged)
++        emit q->geometryChanged(geometry);
++
+     if (availableGeometryChanged)
+         emit q->availableGeometryChanged(availableGeometry);
+ 
+@@ -96,6 +99,9 @@ void QScreenPrivate::emitGeometryChangeS
+         for (QScreen* sibling : siblings)
+             emit sibling->virtualGeometryChanged(sibling->virtualGeometry());
+     }
++
++    if (geometryChanged)
++        emit q->physicalDotsPerInchChanged(q->physicalDotsPerInch());
+ }
+ 
+ void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen)
diff --git a/debian/patches/series b/debian/patches/series
index fb0b5f4..20d5427 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
 # Backported from upstream.
+emit_geometry_changed.diff
 
 # Debian specific.
 gnukfreebsd.diff



More information about the Neon-commits mailing list