Hello community, here is the log from the commit of package libqt5-qtbase for openSUSE:Factory checked in at 2018-07-04 23:54:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libqt5-qtbase (Old) and /work/SRC/openSUSE:Factory/.libqt5-qtbase.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libqt5-qtbase" Wed Jul 4 23:54:39 2018 rev:85 rq:620458 version:5.11.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libqt5-qtbase/libqt5-qtbase.changes 2018-07-01 21:24:33.132912468 +0200 +++ /work/SRC/openSUSE:Factory/.libqt5-qtbase.new/libqt5-qtbase.changes 2018-07-04 23:55:09.631890164 +0200 @@ -7,0 +8,7 @@ +Sat Jun 23 14:03:04 UTC 2018 - fabian@ritter-vogt.de + +- Add patches to improve OOTB experience with HiDPI: + * 0001-Sanitize-QXcbScreen-s-pixelDensity-values.patch + * 0002-xcb-Use-the-screen-s-physical-DPI-as-logical-DPI-unl.patch + +------------------------------------------------------------------- New: ---- 0001-Sanitize-QXcbScreen-s-pixelDensity-values.patch 0002-xcb-Use-the-screen-s-physical-DPI-as-logical-DPI-unl.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libqt5-qtbase.spec ++++++ --- /var/tmp/diff_new_pack.7Vr1jx/_old 2018-07-04 23:55:10.883888783 +0200 +++ /var/tmp/diff_new_pack.7Vr1jx/_new 2018-07-04 23:55:10.887888778 +0200 @@ -66,8 +66,10 @@ Patch13: 0001-Revert-QWidgetWindow-Immediately-forward-close-event.patch # PATCH-FIX-OPENSUSE Patch16: 0001-Hack-together-a-way-to-get-fallback-from-xcb-working.patch +Patch17: 0001-Sanitize-QXcbScreen-s-pixelDensity-values.patch +Patch18: 0002-xcb-Use-the-screen-s-physical-DPI-as-logical-DPI-unl.patch # PATCH-FIX-UPSTREAM -Patch17: qapplication-emit-palettechanged.patch +Patch19: qapplication-emit-palettechanged.patch # patches 1000- 2000 and above from upstream 5.11 branch # # patches 2000-3000 and above from upstream 5.12/dev branch # BuildRequires: alsa-devel ++++++ 0001-Sanitize-QXcbScreen-s-pixelDensity-values.patch ++++++
From 75bb439f45608b21781d18170a88aaa2aedefb04 Mon Sep 17 00:00:00 2001 From: Fabian Vogt
Date: Fri, 9 Mar 2018 18:28:00 +0100 Subject: [PATCH 1/2] Sanitize QXcbScreen's pixelDensity values
When the monitor's EDID contains invalid values, we should catch that now and fall back to 96dpi instead of returning unexpected values. --- src/plugins/platforms/xcb/qxcbscreen.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp index df458e85d7..7e898db17c 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -751,6 +751,16 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation) qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4); m_pixelDensity = qMax(1, qRound(dpi/96)); + + if(m_pixelDensity > 1 && qEnvironmentVariableIsEmpty("QT_XCB_FORCE_ACCEPT_DPI")) { + // If we have no physical size or the resolution is untypical, fall back to 1x + if (physicalSize().height() <= 0 + || geometry.height() < 1440 + || m_pixelDensity > 3) { + m_pixelDensity = 1; + } + } + m_geometry = geometry; m_availableGeometry = geometry & m_virtualDesktop->workArea(); QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry); -- 2.17.1 ++++++ 0002-xcb-Use-the-screen-s-physical-DPI-as-logical-DPI-unl.patch ++++++
From 267ab09b87dd7e2ae7dd3e85a76398506e7f1ae9 Mon Sep 17 00:00:00 2001 From: Fabian Vogt
Date: Wed, 25 Apr 2018 18:34:01 +0200 Subject: [PATCH 2/2] xcb: Use the screen's physical DPI as logical DPI, unless overwritten
The size of the virtual screen is most of the time meaningless, as X fakes it to result in 96 DPI, irregardless of the actual monitor DPI. This results in wrong font rendering on non-96 DPI monitors. Task-number: QTBUG-67928 --- src/plugins/platforms/xcb/qxcbscreen.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp index 7e898db17c..21076a0812 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -606,7 +606,15 @@ QDpi QXcbScreen::logicalDpi() const if (forcedDpi > 0) { return QDpi(forcedDpi, forcedDpi); } - return virtualDpi(); + + // By default, X fakes the virtual size to be 96 dpi (+-rounding), + // so if it's different the user overwrote it. + if (qRound(virtualDpi().first) != 96 || + qRound(virtualDpi().second) != 96) { + return virtualDpi(); + } + + return QDpi(m_pixelDensity * 96, m_pixelDensity * 96); } qreal QXcbScreen::pixelDensity() const -- 2.17.1