summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbscreen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* XCB: do not use reserved identifiersGiuseppe D'Angelo2023-02-071-8/+8
| | | | | | | | | | | Any identifier starting with underscore followed by a capital letter is reserved for the implementation in C++, so don't use them. Rename the entries in the Atom enumeration by adding an "Atom" prefix to them. Pick-to: 6.2 6.4 6.5 Change-Id: I059e2093149f39cc9324cd1159c0d9e076eda93a Reviewed-by: JiDe Zhang <zhangjide@uniontech.com> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-111-3/+3
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* xcb: set _NET_STARTUP_ID at client leader windowIlya Fedin2022-09-021-1/+1
| | | | | | | | | | This should help to overcome WM's focus prevention mechanism Fixes: QTBUG-96276 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Ic5fb46f7ce54f0df29850725bafa364b74e30d25 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: set primary screen more correctlyLiang Qi2022-06-211-4/+16
| | | | | | | | | | | | | | | For example, when having virtual monitor which includes two real monitors, the primary information in xcb_randr_monitor_info_t is normally false, because user can only set it for output. Kudos to Jiang Wu for his first patch and details of the issue. Done-with: Jiang Wu <wujiang@kylinos.cn> Pick-to: 6.4 6.3 Change-Id: I6af443ff69d347a6d86efc9c8ea7a5d18f4c3e24 Reviewed-by: JiDe Zhang <zhangjide@uniontech.com> Reviewed-by: Jiang Wu <wujiang@kylinos.cn> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: clear m_singlescreen before updateJiang Wu2022-06-211-0/+1
| | | | | | Pick-to: 6.4 6.3 Change-Id: Iafff57be82b5beb1f5702c00e0b6d7d0dd3ccdc2 Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: fix missing initialization of m_cursorNils Jeisecke2022-06-211-6/+3
| | | | | | | | | | | | | | | | | | | | Regression introduced in 9a4c98e55659b32db984612e6247ac193812a502: m_cursor is not initialized and never set when monitorInfo is not available in QXcbScreen::setMonitor. This seems to happen when running in VNC, e.g. on a Raspberry Pi. This usually results in crashing the application pretty soon. Using a unique_ptr solves both the initialization and a possible leak when setMonitor is called multiple times. [ChangeLog][Linux/XCB] Fixed crash when no monitorInfo is available (e.g. VNC). Fixes: QTBUG-104443 Pick-to: 6.3 6.4 Change-Id: If13493c177121a1994b5d00dfbd64f1da694df2e Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: only set primary for monitor on primary X screenLiang Qi2022-05-201-1/+4
| | | | | | | | | | | | | It's possible to have multiple X screens, and a primary monitor on each X screen. We should only use one on primary X screen as primary QScreen. The reference of QXcbScreen pointer should be used correctly. Fixes: QTBUG-102758 Pick-to: 6.3 Change-Id: I1eafd509c8c109606967a4abe9ad7e9d8c0dd464 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* xcb: Remove unused codesJiDe Zhang2022-05-061-1/+0
| | | | | | | | | Removed the "QByteArray ba = connection()->atomName(monitorInfo->name);" from QXcbScreen::setMonitor. Pick-to: 6.3 Change-Id: I3b613510669ce9fa6f5e1a4c2491bffe4887ff88 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Plugins: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-05-021-2/+2
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: Id76add7e86b6dfb89f758a9efb0644067f0f44de Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* xcb: get geometry correctly for rotation with RAndR 1.5Liang Qi2022-04-081-3/+0
| | | | | | | | xcb_randr_get_crtc_info() returns already rotated size. Pick-to: 6.3 Change-Id: I33eacf988b44cea77411ad79ae24fef7e8e1564e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: Correctly set physical size for screen with RandR 1.5Liang Qi2022-04-041-10/+29
| | | | | | | | | This amends 9a4c98e55659b32db984612e6247ac193812a502. Fixes: QTBUG-101038 Pick-to: 6.3 Change-Id: Ie75953af475dc606b34c3e274438075f20bdd8ae Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: Correctly update primary screen status with RandR 1.5Zhang Hao2022-01-121-3/+1
| | | | | | | | | | This amends d8f37d94e537aaab4fa960b80aacabe79bcc14c4 . Fixes: QTBUG-99605 Pick-to: 6.3 Done-with: Liang Qi <liang.qi@qt.io> Change-Id: Ia4cf67d6ebeed36596c0342302aa0b4af01769bc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: remove confusing indirections for qt selection ownerGatis Paeglis2021-10-221-3/+3
| | | | | | | | | | | | | | | | | | | | This makes it more obvious that clipboard and DnD use the same selection owner (QXcbConnection::qtSelectionOwner()). This way we can also drop some QT_NO_CLIPBOARD defines. These defines actually are broken, but that is out-of-scope for this patch. And renamed the functions according to Qt guidelines: getSelectionOwner() -> selectionOwner() getQtSelectionOwner() -> qtSelectionOwner() The previous naming probably was influenced by underlying C API - xcb_get_selection_owner(). Change-Id: I467f1a3dbe75b4e8fd41c7e66ca9b0e25ef1039c Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: Fix typos in source code commentsJonas Kvinge2021-10-141-1/+1
| | | | | Change-Id: I3a91f57d3c47d9e96215d5dc064664626a8f65e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qxcbscreen: Fix typo in documentationJonas Kvinge2021-10-141-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: I92f7d707a1395594ad6d1fe841fa77d21ae7c8b1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: convert last screen to fake when no screenLiang Qi2021-09-181-10/+27
| | | | | | | | | | | | | | | | | available for xrandr 1.5 like we did before for xrandr 1.4 (since a094af001795c9651b299d700a992150d1aba33a). Tested with following combination: * qtbase -DECM_ENABLE_SANITIZERS=address cmake build * examples/widgets/widgets/wiggly with ASAN_OPTIONS=verify_asan_link_order=0 env * xrandr --output LastScreen --off and --auto. Fixes: QTBUG-96247 Task-number: QTBUG-42985 Change-Id: Idd95d1a3aa057d23e3adb6635dd1acbb2c853497 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* xcb: support xrandr(1.5) monitor setupLiang Qi2021-09-011-5/+115
| | | | | | | | | | | | | | | | | | | | | | | | More information about monitor in xrandr 1.5, see https://keithp.com/blogs/MST-monitors/ Since this change, screen is logical instead of physical. If xrandr 1.5 and later is installed, Qt screen info will get from xrandr monitor object instead of xrandr output if only have 1.2 to 1.4. Users can manipulate monitor as they want, for example, a combination for two physical screens, half of one screen and etc. Didn't have chance to access MST monitors, but it should work if xrandr monitor object was created automatically. [ChangeLog][xcb] Qt screen info will get from xrandr monitor object if 1.5 is installed. Fixes: QTBUG-65457 Change-Id: Iad339cc0d4293b2403b4ef6bf6eb770feb3e685f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Read DPI from X Settings initially as wellIlya Fedin2021-04-201-7/+16
| | | | | | | | | | | | | | | | | | | | | | Currently, Xft.dpi from X Resources is read initially, while changes are monitored for Xft/DPI from X Settings. These protocols are different and can have different values. E.g. MATE sets X Resources' Xft.dpi to 96.30859375, while X Settings' Xft/DPI is set to 197240 at 2x scale. This results in a very weird bug when Qt can't determine 2x scale initially, but if scale is changed at run time, Qt changes scale to the right value. The difference could be checked via xrdb -query and dump_xsettings (the second is from xsettingsd project). [ChangeLog] Qt now reads Xft/DPI from X settings at startup, and will prefer this value over Xft.dpi from X resources. Pick-to: 6.0 6.1 5.15 Change-Id: If6adac0c88198579332ddebc673f1524f324c0e4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Add QPlatformScreen::colorSpace()Allan Sandfeld Jensen2021-01-251-0/+34
| | | | | | | | Added for macOS and X11 screens Task-number: QTBUG-90535 Change-Id: Ifafe7a07ee2abc3c42cd12785db2d7329878375b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Adjust the format of code blocks in handleScreenChange functionLu Zhen2020-12-251-1/+1
| | | | | Change-Id: I5da777e2196c005d6d5402c254a9452c3a888036 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: Fix available geometry after rotationAlexander Volkov2020-12-131-4/+9
| | | | | | | | | | | | | | QXcbVirtualDesktop::m_workArea is not updated after screen rotation if _NET_WORKAREA is not updated, e.g. when a window manager is not running. Use width of -1 for m_workArea to indicate that _NET_WORKAREA is not set and thus there is no need to find its intersection with screens' geometries. Pick-to: 5.15 6.0 Change-Id: Ic1f3ec23576ed8407a76cc2b9f84a145c67b1d4b Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: Reduce number of created colormapsAlexander Volkov2020-09-161-0/+19
| | | | | | | | | | Create a colormap per visual, not per window. Pick-to: 5.15 Change-Id: I97d94618f159b4beaffd4a1afe0611233ced6676 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* X11: set fallback logical DPI to 96Morten Johan Sørvig2020-09-101-6/+6
| | | | | | | | | | | | | | | | | | Returning physical DPI from logicalDpi() is problematic, as explained in commit 77e04acb. The most predictable implementation is to never return physical DPI from QPlaformScreen::logicalDpi(). Other platform plugins already does this, and this change brings xcb in line with the rest of Qt. We have the QPlatformScreen::physicalSize() API which covers returning physical DPI (indirectly); Options for selecting which one to use can be implemented on top of these (see QT_USE_PHYSICAL_DPI). Change-Id: Ifc41229fa63734a2eb06b3acefd97b2ed3e57c2d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: drop Xinerama supportLiang Qi2020-09-041-9/+1
| | | | | | | | | | [ChangeLog][Important Behavior Changes][X11] Xinerama is no longer supported. Fixes: QTBUG-86082 Change-Id: Ieb57d9035e1659fc22bf8333247fc3573fb62992 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* X11: restrict fallback logical DPI to 96 and higherMorten Johan Sørvig2020-08-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QXcbScreen determines logical DPI using the following priority: 1) use Xft.dpi if set 2) virtual desktop size / virtual desktop physical size (This change does not restrict or alter the value obtained from Xft.dpi in any way) The fallback option 2) has several problems: - It is a physical DPI, which does not account for viewing distance or user preference - It is a global value for the entire virtual desktop (not per-screen) - X servers usually fake the virtual desktop physical size such that the computed DPI ends up at 96; in cases where this does not happen we can end up with a surprising DPI value. We might be better off just hardcoding 96 here, to avoid picking up an incorrect physical DPI when for example connecting to a TV (as reported in QTBUG-67928). This change does not go as far as hardcoding 96, but instead restricts the (fallback) DPI value to be 96 or higher. Pick-to: 5.15 Task-number: QTBUG-67928 Change-Id: Ieea6c7a137261282b40302fb4c19273c5def10af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* XCB: Update logical DPI on “Xft/DPI” changeMorten Johan Sørvig2020-08-051-0/+14
| | | | | | | | | | Install XSettings property change callback on the “Xft/DPI” property. Update QxcbVirtualDesktop::m_forcedDpi and QScreen logicalDPI on change. Pick-to: 5.15 Change-Id: I578ebe9017fee58acd7a5c432cbd614fd35f2f55 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QXcbScreen platform interfaceTor Arne Vestbø2020-07-201-8/+0
| | | | | | Task-number: QTBUG-84220 Change-Id: I6c166409fbaf50627dea65a6256764e08ab36a59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-02-181-1/+3
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlinkedlist.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmscreen.cpp Change-Id: Iefca7f9f4966bdc20e7052aca736874861055738
| * Avoid return QImage::Format_Invalid from QPlatformScreen::format()Allan Sandfeld Jensen2020-02-141-1/+3
| | | | | | | | | | | | | | | | | | This can be used to set the pixmap format, and needs to be defined to something sane even if there is no primary screen. Task-number: QTBUG-81671 Change-Id: Ic0d41cec31ac71309123aa8bb8b840fa4a4122bb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-291-11/+0
|\| | | | | | | Change-Id: I98b1a5a11ece3957a1115c1d9be8841759206ffe
| * Revert "Do not read Xft.dpi on platforms that shouldn't be using Xft settings"David Edmundson2020-01-201-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c7fec68e1936576070d0fbac6cf40b818366d298. This commit introduces a behavioural change within 5.14. It's designed to special case plasma with a fix, but in practice it will cause us more problems. It will break: - font size on plasmashell and kwin on xcb which do not use Qt scaling - xwayland on projectors/headless tests The original bug of double scaling that this was trying to fix is fixed by b31852c4caa36cc564e25adbdacfa534e1dfe7c0 which is in 5.14.1 which works in combination with the environment variables we set in plasma so this is not needed. Fixes: QTBUG-81532 Change-Id: I2f1b8ae4aecf7b80be4dbee812e6b4a64244fb1f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-271-2/+12
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/platforms/xcb/qxcbscreen.cpp src/widgets/accessible/qaccessiblewidget.cpp Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
| * Parse Xft.dpi with fractionAllan Sandfeld Jensen2019-12-171-2/+12
| | | | | | | | | | | | | | | | | | Some versions of GNOME 3 would set Xft.dpi with fraction though that is technically not valid. Change-Id: Ib1027283cc78fd5d9869cd337864a92e28cd7e88 Fixes: QTBUG-64738 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-101-0/+11
|\| | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| * Do not read Xft.dpi on platforms that shouldn't be using Xft settingsAllan Sandfeld Jensen2019-12-051-0/+11
| | | | | | | | | | | | | | | | | | | | We only read this for desktop environments that have traditionally used these to set settings for other toolkits. Fixes: QTBUG-80323 Change-Id: Ifa8c2682301e69c2770d3734115080a0e6b4e85c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-5/+5
|/ | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-10-101-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbscreen.h src/src.pro Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
| * Xcb: fix rounding error in reporting screen refresh rateKirill Burtsev2019-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | Screen refresh rate might not be just integer but with decimal part like, for example, 59.97 Hz. Fix calculation from raw xcb data and its store type as it is qreal already for QScreen::refreshRate API. Task-number: QTBUG-73911 Change-Id: Ia0494e953176c2854f0ed42c4498a29cfef16106 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-251-5/+15
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/network/ssl/qsslsocket_openssl.cpp Change-Id: Ibc9ce799bef62d60d616beaa9fbde8ebeadfbc20
* | | Move QT_FONT_DPI to cross-platform codeMorten Johan Sørvig2019-08-231-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to test the effects of setting Qt::AA_HighDpiScaling/QT_AUTO_SCREEN_SCALE_FACTOR, with different DPI values on all platforms. This also makes it possible to access the actual DPI values reported by the OS/WS via the QPlatformScreen API. A drawback is that there is no single place to check the environment variable; currently done in three places. This may be further simplified later on. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Task-number: QTBUG-53022 Change-Id: Idd6463219d3ae58fe0ab72c17686cce2eb9dbadd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Update Dpi and scale factor computationMorten Johan Sørvig2019-08-231-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove pixelScale() in favor of logicalBaseDpi(). Compute scale factor based on logical DPI and logical base DPI, or optionally based on the physical DPI. Add policies for running the scale factor and adjusting the logical DPI reported to the application. The policies are set via environment variables: QT_SCALE_FACTOR_ROUNDING_POLICY=Round|Ceil|Floor|RoundPreferFloor|PassThrough QT_DPI_ADJUSTMENT_POLICY=AdjustDpi|DontAdjustDpi|AdjustUpOnly QT_USE_PHYSICAL_DPI=0|1 Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Task-number: QTBUG-53022 Change-Id: I4846f223186df665eb0a9c827eaef0a96d1f458f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-06-251-5/+15
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/android/qandroidinputcontext.cpp src/widgets/styles/qstylesheetstyle.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
| * | Use Xft DPI as basis for HiDPI scalingAllan Sandfeld Jensen2019-06-191-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GNOME indicates DPI modes by setting high DPI values in Xft.DPI, so we need to use the forced DPI setting instead of the real DPI, as basis for QPA pixel density. Change-Id: I6f25636383b16b89a3d5fe4c904afd079fe001aa Fixes: QTBUG-74836 Task-number: QTBUG-65424 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Prefix textstream operators with Qt::Lars Knoll2019-05-021-3/+3
| |/ |/| | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | XCB plugin: replace deprecated QList::swap()Christian Ehrlicher2018-12-171-1/+1
|/ | | | | | | QList::swap(int, int) was deprecated. Replace it with swapItemsAt() Change-Id: I077c5b7222e40b928ee9035b8cbf4ebcc91aa15e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12.0Liang Qi2018-11-051-7/+0
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoaglcontext.mm src/plugins/platforms/xcb/qxcbscreen.h Change-Id: If9b4c67288396ff7346088ce591c7a3588b51979
| * xcb: Don't get initial screen rotationBłażej Szczygieł2018-10-291-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | "xcb_randr_get_screen_info" can be slow and in some configurations can cause short mouse cursor freezes (which will happen on Qt application startup). Initial screen rotation was used only to not handle possible redundant screen change event. Fixes: QTBUG-70760 Change-Id: I9f01325a045d2c82c4dd2fce91a18a34e54a4bcd Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | xcb: use 128 as a reference DPI for small screensMathieu Velten2018-10-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | This is a better version of 23b139038a1dc9a769a358ab112453abcdd39290 which was reverted. Task-number: QTBUG-68620 Task-number: QTBUG-53022 Task-number: QTBUG-57211 Change-Id: I0b37fc261945c542bbfb30cecfe4b0a97c655e3c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>