summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-10-02 21:36:04 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-10-04 17:54:06 +0200
commit5e4b74cf31c4478d491f577d5746e4024b3ea552 (patch)
tree1907eb5ec467234af8b7b026c85748d0b3ed4744 /dev-qt
parentdev-lang/go: remove unstable 1.14.8 (diff)
downloadgentoo-5e4b74cf31c4478d491f577d5746e4024b3ea552.tar.gz
gentoo-5e4b74cf31c4478d491f577d5746e4024b3ea552.tar.bz2
gentoo-5e4b74cf31c4478d491f577d5746e4024b3ea552.zip
dev-qt/qtgui: Fix multiscreen regression
"There is a bug in Qt 5.15.1 that seriously affects multiscreen. We get a bunch of reports every day. Effectively a screen change signal goes missing and Plasma naturally breaks." See also: https://mail.kde.org/pipermail/distributions/2020-September/000866.html KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=426496 QTBUG: https://bugreports.qt.io/browse/QTBUG-86604 Cherry-picked from: https://codereview.qt-project.org/c/qt/qtbase/+/315721 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch86
-rw-r--r--dev-qt/qtgui/qtgui-5.15.1-r1.ebuild185
2 files changed, 271 insertions, 0 deletions
diff --git a/dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch b/dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch
new file mode 100644
index 000000000000..3e4187b22a06
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch
@@ -0,0 +1,86 @@
+From 65243ad7aef48af4689ea4454916b504025b5051 Mon Sep 17 00:00:00 2001
+From: Friedemann Kleint <Friedemann.Kleint@qt.io>
+Date: Fri, 25 Sep 2020 14:10:58 +0200
+Subject: [PATCH] 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.
+
+Amends 5290027e3bab75f14fc0a2b7c206594d9cb91e76.
+
+Task-number: QTBUG-76902
+Task-number: QTBUG-79248
+Fixes: QTBUG-86604
+Change-Id: I3dc2ec5ccd9c6413e92f9246242f323e8afc5e57
+Reviewed-by: David Edmundson <davidedmundson@kde.org>
+(cherry picked from commit 5c7307775d32ae0a54acad8ae7a1c9d3cff7d45e)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+---
+ src/gui/kernel/qguiapplication.cpp | 11 +++++------
+ src/gui/kernel/qscreen.cpp | 6 ++++++
+ 2 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
+index 239a78313c5..ef090605819 100644
+--- a/src/gui/kernel/qguiapplication.cpp
++++ b/src/gui/kernel/qguiapplication.cpp
+@@ -3162,13 +3162,14 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
+ 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::processScreenGeometryChange(QWindowSystemInterfaceP
+ updateFilteredScreenOrientation(s);
+ }
+
+- s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
+-
+ resetCachedDevicePixelRatio();
+ }
+
+diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
+index df628fcc73a..a1afc1ba143 100644
+--- a/src/gui/kernel/qscreen.cpp
++++ b/src/gui/kernel/qscreen.cpp
+@@ -88,6 +88,9 @@ void QScreenPrivate::updateGeometriesWithSignals()
+ 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::emitGeometryChangeSignals(bool geometryChanged, bool availa
+ for (QScreen* sibling : siblings)
+ emit sibling->virtualGeometryChanged(sibling->virtualGeometry());
+ }
++
++ if (geometryChanged)
++ emit q->physicalDotsPerInchChanged(q->physicalDotsPerInch());
+ }
+
+ void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen)
+--
+2.16.3
diff --git a/dev-qt/qtgui/qtgui-5.15.1-r1.ebuild b/dev-qt/qtgui/qtgui-5.15.1-r1.ebuild
new file mode 100644
index 000000000000..be95e1eff6bf
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.1-r1.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+SLOT=5/$(ver_cut 1-3) # bug 707658
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2-only ibus jpeg
+ +libinput +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+ || ( eglfs X )
+ accessibility? ( dbus X )
+ eglfs? ( egl )
+ ibus? ( dbus )
+ libinput? ( udev )
+ X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}:5=
+ dev-util/gtk-update-icon-cache
+ media-libs/fontconfig
+ >=media-libs/freetype-2.6.1:2
+ >=media-libs/harfbuzz-1.6.0:=
+ sys-libs/zlib:=
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ eglfs? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm
+ )
+ evdev? ( sys-libs/mtdev )
+ gles2-only? ( media-libs/mesa[gles2] )
+ !gles2-only? ( virtual/opengl )
+ jpeg? ( virtual/jpeg:0 )
+ libinput? (
+ dev-libs/libinput:=
+ >=x11-libs/libxkbcommon-0.5.0
+ )
+ png? ( media-libs/libpng:0= )
+ tslib? ( >=x11-libs/tslib-1.21 )
+ tuio? ( ~dev-qt/qtnetwork-${PV} )
+ udev? ( virtual/libudev:= )
+ vnc? ( ~dev-qt/qtnetwork-${PV} )
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libxcb-1.12:=[xkb]
+ >=x11-libs/libxkbcommon-0.5.0[X]
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}
+ evdev? ( sys-kernel/linux-headers )
+ udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+ ibus? ( app-i18n/ibus )
+ wayland? ( ~dev-qt/qtwayland-${PV} )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qvkgen
+ src/gui
+ src/openglextensions
+ src/platformheaders
+ src/platformsupport
+ src/plugins/generic
+ src/plugins/imageformats
+ src/plugins/platforms
+ src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl:egl:
+ eglfs:eglfs:
+ eglfs:eglfs_egldevice:
+ eglfs:eglfs_gbm:
+ evdev:evdev:
+ evdev:mtdev:
+ :fontconfig:
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2-only::OPENGL_ES
+ gles2-only:opengles2:OPENGL_ES_2
+ !:no-gui:
+ :system-harfbuzz:
+ !:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ libinput
+ libinput:xkbcommon:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ tslib:tslib:
+ udev:libudev:
+ vulkan:vulkan:
+ X:xcb:
+ X:xcb-glx:
+ X:xcb-plugin:
+ X:xcb-render:
+ X:xcb-sm:
+ X:xcb-xlib:
+ X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :gui
+)
+
+PATCHES=(
+ "${FILESDIR}/qt-5.12-gcc-avx2.patch" # bug 672946
+ "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306
+ "${FILESDIR}/${P}-emit-qscreen-geometrychanged-when-dpi-changes.patch" # QTBUG-86604
+)
+
+src_prepare() {
+ # don't add -O3 to CXXFLAGS, bug 549140
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+ # egl_x11 is activated when both egl and X are enabled
+ use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+ qt_use_disable_config dbus dbus \
+ src/platformsupport/themes/genericunix/genericunix.pri
+
+ qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+ src/plugins/platforms/platforms.pro || die
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(usex eglfs '-gbm -kms' '')
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ -gui
+ -system-harfbuzz
+ $(qt_use jpeg libjpeg system)
+ $(qt_use libinput)
+ -opengl $(usex gles2-only es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use tslib)
+ $(qt_use udev libudev)
+ $(qt_use vulkan)
+ $(qt_use X xcb)
+ $(usex X '-xcb-xlib' '')
+ )
+ if use libinput || use X; then
+ myconf+=( -xkbcommon )
+ fi
+ qt5-build_src_configure
+}