From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
Date: Sun, 4 Oct 2020 16:07:18 +0000 (UTC) [thread overview]
Message-ID: <1601826846.5e4b74cf31c4478d491f577d5746e4024b3ea552.asturm@gentoo> (raw)
commit: 5e4b74cf31c4478d491f577d5746e4024b3ea552
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 2 19:36:04 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 4 15:54:06 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e4b74cf
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 <AT> gentoo.org>
...-qscreen-geometrychanged-when-dpi-changes.patch | 86 ++++++++++
dev-qt/qtgui/qtgui-5.15.1-r1.ebuild | 185 +++++++++++++++++++++
2 files changed, 271 insertions(+)
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 00000000000..3e4187b22a0
--- /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 00000000000..be95e1eff6b
--- /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
+}
next reply other threads:[~2020-10-04 16:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-04 16:07 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-15 15:25 [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/ Andreas Sturmlechner
2023-10-24 10:26 Andreas Sturmlechner
2023-10-09 23:03 Ionen Wolkens
2022-12-10 12:25 Andreas Sturmlechner
2022-08-15 14:10 Andreas Sturmlechner
2021-01-02 1:23 Andreas Sturmlechner
2020-08-22 18:52 Andreas Sturmlechner
2019-03-02 4:44 Mike Gilbert
2018-10-30 17:46 Andreas Sturmlechner
2018-02-22 20:09 Andreas Sturmlechner
2018-02-08 0:10 Andreas Sturmlechner
2017-06-10 6:01 Andreas Sturmlechner
2016-02-14 16:29 Michael Palimaka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1601826846.5e4b74cf31c4478d491f577d5746e4024b3ea552.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox