summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
Commit message (Collapse)AuthorAgeFilesLines
* evdevtouch: Fix wrong addTouchPoint for "mtdev"Valery Volgutov2021-02-241-3/+7
| | | | | | | | | | | | | | | | Origin patch 359546b069051213a7b337fefbe21b664618f959 has following rule: "the state for processed released points is reset to zero at the end of the SYN_REPORT handler" Patch 4e400369c08db251cd489fec1229398c224d02b4 changed state according new event refactor, but not fully. Task-number: QTBUG-86013 Change-Id: If35b756d5c726533f11d18e7b73c98fffa17d809 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 462410a08b8bbfb068b6e06573adb0701c527d06) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* evdevtouch: Fix normalizedPositionValery Volgutov2021-01-271-0/+6
| | | | | | | | | | Set the available virtual screen geometry. This geometry is needed for QEventPoint::normalizedPosition calculation. Change-Id: I7e25488d62a5099c14b5c15fa2b4040ea32b9ecd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com> (cherry picked from commit f7f618b3125289ab6ad68fe6c4ccf9864c41b02f)
* Support customized device discovery with udevElvis Lee2020-11-091-1/+3
| | | | | | | | | | With derived class from QDeviceDiscoveryUDev, eglfs for a platform can create own input handlers. Task-number: QTBUG-85268 Change-Id: Ib8e99b365195eff9540e7c90e14c5d269d37ad86 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Mark changed regions dirty instead of bounding box of changesJoni Poikelin2020-11-041-3/+3
| | | | | | | | This helps a bit with LinuxFB on low end devices. Change-Id: I16fcce23e7073272d1d1c6bc660c255163b96c30 Fixes: QTBUG-88174 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* CMake: Regenerate qtbase projects to use correct CONFIG_MODULE_NAMEsAlexandru Croitor2020-10-308-2/+8
| | | | | | | | Also sneak in testlib's misisng QMAKE_MODULE_CONFIG values. Task-number: QTBUG-88025 Change-Id: I76a37b8d8dbf7f294f91e32a5edbc52f5c83555b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate qtbase projectsAlexandru Croitor2020-10-302-1/+27
| | | | | | | | | | In preparation for some further regeneration. Also modify pro2cmake to add forgotten mapping for the Qt::EglFsKmsGbmSupportPrivate module. Change-Id: I92425c566c2b275b40eec8c652496290754ac385 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* webOS: Support mapping evdev keyboard and touchscreen to specific windowElvis Lee2020-10-278-31/+104
| | | | | | | | | | | | | | | | | | | | | | First we refactor QTouchOutputMapping into a QOutputMapping base class and a QDefaultOutputMapping subclass, because it will be used to map more kinds of devices, not only touchscreens. On WebOS, the plan is to have a custom subclass that overrides an additional windowForDeviceNode() virtual function, so that events from specific devices can be sent to specific windows. But in the future, Qt may have a more generic mechanism for mapping devices to screens, and of course windows are displayed on screens; so this direct device->window mapping is likely to be temporary. In the QT_QPA_EGLFS_KMS_CONFIG JSON configuration, symlinked device nodes are now supported. Task-number: QTBUG-85268 Change-Id: Id1f0bb59f4a439abaec6bd35016c95de1cbdb26a Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Export gbm device integration to build it outsideElvis Lee2020-10-232-4/+3
| | | | | | | | | | | Support external build for device integration which uses kms and gbm. QKmsScreenConfig supports inheritance to consider platform specific screen configuration. Task-number: QTBUG-85268 Change-Id: Iac58898a9cf0bb1d53237a719667a6ebd53d88b9 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* cmake: Sync FbSupport module name with pro fileTor Arne Vestbø2020-10-211-0/+1
| | | | | Change-Id: I5374618a34811d516eb8fd12c1429b851fd108c4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QHighDpi: window geometry scaling functionsMorten Johan Sørvig2020-10-201-1/+1
| | | | | | | | | | | | | | | | | | Add functions which scales window geometry: framNativeWindowGeometry() toNativeWindowGeometry() These correctly handles top-level and child windows, where top-level window positions scale around the screen origin while child window positions scale around (0, 0). Modify call cites to use the new functions. We no longer need the isTopLevel checks at the call site. Change-Id: I0158672d46a3f52dfc7d37d021fc5cebd7859200 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-075-6/+6
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-237-33/+33
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Make xkb a private dependency of QtGuiJoerg Bornemann2020-09-163-0/+11
| | | | | | | | | | It should not be necessary to have the xkb dev package installed for users of QtGui. Task-number: QTBUG-86421 Change-Id: I4a4102d578df504d23f504a97704fcab4a39023b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Properly free m_mtdev when mtdev_open() returns an errorSteffen Kieß2020-08-261-0/+1
| | | | | | Pick-to: 5.15 Change-Id: I57813da1eafe9fbc9d60b865e867558791e34528 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Remove linuxofonoFriedemann Kleint2020-07-157-635/+0
| | | | | | | | | The module appears to be unused. Task-number: QTBUG-83255 Change-Id: I0b6942734b8b4fcfd90515ba12d751ffccfad15c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move eglconvenience to QtGuiFriedemann Kleint2020-07-1317-2757/+0
| | | | | | | Task-number: QTBUG-83255 Change-Id: I8a008d8906308dd73a0793db5b88d3a1b6fdaf5c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Refactor pointer event hierarchyShawn Rutledge2020-07-102-38/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some goals that have hopefully been achieved are: - make QPointerEvent and QEventPoint resemble their Qt Quick counterparts to such an extent that we can remove those wrappers and go back to delivering the original events in Qt Quick - make QEventPoint much smaller than QTouchEvent::TouchPoint, with no pimpl - remove most public setters - reduce the usage of complex constructors that take many arguments - don't repeat ourselves: move accessors and storage upwards rather than having redundant ones in subclasses - standardize the set of accessors in QPointerEvent - maintain source compatibility as much as possible: do not require modifying event-handling code in any QWidget subclass To avoid public setters we now introduce a few QMutable* subclasses. This is a bit like the Builder pattern except that it doesn't involve constructing a separate disposable object: the main event type can be cast to the mutable type at any time to enable modifications, iff the code is linked with gui-private. Therefore event classes can have less-"complete" constructors, because internal Qt code can use setters the same way it could use the ones in QTouchEvent before; and the event classes don't need many friends. Even some read-accessors can be kept private unless we are sure we want to expose them. Task-number: QTBUG-46266 Fixes: QTBUG-72173 Change-Id: I740e4e40165b7bc41223d38b200bbc2b403e07b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move qglxconvenience to QtOpenGLFriedemann Kleint2020-07-088-601/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: I7640caf8afbae0a7310a264f333bb3a6cfa3c6ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-073-6/+6
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use qsizetype in QListLars Knoll2020-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | The change creates a slight source incompatibility. The main things to take care of are * code using printf statements on list.size(). Using qsizetype in printf statements will always require a cast to work on both 32 and 64 bit. * A few places where overloads now get ambiguous. One example is QRandomGenerator::bounded() that has overloads for int, uint and double, but not int64. * Streaming list.size() to a QDataStream will change the format depending on the architecture. [ChangeLog][QtCore][QList] QList now uses qsizetype to index into elements. Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QList instead of QVector in platformsupportJarek Kobus2020-07-0610-28/+28
| | | | | | Task-number: QTBUG-84469 Change-Id: I8e4e6626cc840bc9c8bce014c595da9080025dd8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move linuxaccessibility to QtGuiFriedemann Kleint2020-07-0624-4861/+0
| | | | | | | | Change some too-generic file names. Task-number: QTBUG-83255 Change-Id: I4497ee2508bc323566f4061d4547707b7bda7a77 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move xkbcommon to QtGuiFriedemann Kleint2020-07-0410-1254/+3
| | | | | | | Task-number: QTBUG-83255 Change-Id: Ia1c6a49af6be4aaa6b988537c38db3a2c0a646a5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Re-run pro2cmake on gui, platformheadersTor Arne Vestbø2020-07-032-2/+1
| | | | | | | platformsupport and plugins/platforms Change-Id: Id123bc4165387aa867bf4b61ffc3e9dabc2d4780 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Only use one macro per lineLars Schmertmann2020-07-031-3/+7
| | | | | | | | | Also add a ; where it is missing. Task-number: QTBUG-82978 Change-Id: Ic5d2a07363c25ab641d234baca89bc62238458cb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce platform API abstraction for QOpenGLContextTor Arne Vestbø2020-07-024-43/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API is available by including qopenglcontext.h as usual, but scoped in the QPlatformInterface namespace. The namespace exposes platform specific type-safe interfaces that provide: a) Factory functions for adopting native contexts, e.g. QCocoaGLContext::fromNative(nsContext, shareContext); b) Access to underlying native handles, e.g. openGLContext->platformInterface<QCocoaGLContext>->nativeContext() c) Platform specific functionality, e.g. static QWGLContext::openGLModuleHandle() openGLContext->platformInterface<QEGLContext>->doSomething(); The platform interfaces live close to the classes they extend, removing the need for complex indirection and plumbing, and avoids kitchen-sink modules and APIs such as the extras modules, QPlatformFunctions, or QPlatformNativeInterface. In the case of QOpenGLContext these platform APIs are backed by the platform plugin, so dynamic_cast is used to ensure the platform plugin supports the requested interface, but this is and implementation detail. The interface APIs are agnostic to where the implementation lives, while still being available to the user as part of the APIs they extend/augment. The documentation will be restored when the dust settles. Task-number: QTBUG-80233 Change-Id: Iac612403383991c4b24064332542a6e4bcbb3293 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move the EDID parser into QtGuiFriedemann Kleint2020-07-018-2598/+0
| | | | | | | | | As a drive by, fix recursive inclusion in qxcbscreen.h. Task-number: QTBUG-83255 Change-Id: Ia008921b559ef450c07aa17ca554c6b35e0a88bd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move UNIX themes into QtGuiFriedemann Kleint2020-06-2230-4597/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: I9e3aecd8e172b60121f472c840eaf2a5538af438 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Move UNIX services into QtGuiFriedemann Kleint2020-06-188-505/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: I95cd25c6e18ffb46955acc76d6cab551d1c8f5ae Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Introduce QInputDevice hierarchy; replace QTouchDeviceShawn Rutledge2020-06-166-44/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen during the Qt 5 series that QMouseEvent::source() does not provide enough information: if it is synthesized, it could have come from any device for which mouse events are synthesized, not only from a touchscreen. By providing in every QInputEvent as complete information about the actual source device as possible, we will enable very fine-tuned behavior in the object that handles each event. Further, we would like to support multiple keyboards, pointing devices, and named groups of devices that are known as "seats" in Wayland. In Qt 5, QPA plugins registered each touchscreen as it was discovered. Now we extend this pattern to all input devices. This new requirement can be implemented gradually; for now, if a QTWSI input event is received wtihout a device pointer, a default "core" device will be created on-the-fly, and a warning emitted. In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when multiple devices were in use simultaneously. Now that each event identifies the device it came from, this hack is no longer needed. A stub of the new QPointerEvent is added; it will be developed further in subsequent patches. [ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer to an instance of QInputDevice, or the subclass QPointingDevice in case of mouse, touch and tablet events. Each platform plugin is expected to create the device instances, register them, and provide valid pointers with all input events. If this is not done, warnings are emitted and default devices are created as necessary. When the device has accurate information, it provides the opportunity to fine-tune behavior depending on device type and capabilities: for example if a QMouseEvent is synthesized from a touchscreen, the recipient can see which touchscreen it came from. Each device also has a seatName to distinguish users on multi-user windowing systems. Touchpoint IDs are no longer unique on their own, but the combination of ID and device is. Fixes: QTBUG-46412 Fixes: QTBUG-72167 Task-number: QTBUG-69433 Task-number: QTBUG-52430 Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Move Unix font databases into QtGuiFriedemann Kleint2020-06-1514-1474/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Id85a1e0f3de371951783fe97485158c4a02e1f15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port platformsupport to QStringViewLars Knoll2020-06-158-13/+13
| | | | | | Task-number: QTBUG-84319 Change-Id: I8032382904bc8481fe0a147ca38f3de9cfb1890f Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Move windows font databases into QtGuiFriedemann Kleint2020-06-1118-6602/+0
| | | | | | | | | | Requires adapting a few config checks since cmake currently does not detect directwrite. Task-number: QTBUG-83255 Task-number: QTBUG-83931 Change-Id: I521f1924f701260b41dccbcecf87b19f08df5ccc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move the UNIX event dispatchers into QtGuiFriedemann Kleint2020-06-1012-595/+3
| | | | | | Task-number: QTBUG-83255 Change-Id: I7d32eb1ec01784c9ed6bf5fc4913ffc5b3a34a49 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move the Windows Event Dispatcher into QtGuiFriedemann Kleint2020-06-095-321/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Ida86f27d7f52b9be48fbea909979320866ff8dae Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-081-1/+1
| | | | | | | Many of these were generated by clazy using the new qevent-accessors check. Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove deprecated text-related enumsEskil Abrahamsen Blomfeldt2020-06-081-44/+5
| | | | | | | | Fixes: QTBUG-82367 Change-Id: Iff2645759657f8e350754e90e791dbd583017671 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QWindowsFontDatabase: replace a QPair with a dedicated structMarc Mutz2020-06-073-5/+20
| | | | | | | | | | | | | Pairs are easy to use, but they have no semantics attached: Two QPair<QString, QString> compare equal, e.g., even though one is used as a FontAndStyle and the other as, say, a type/subtype. It also carries no information for the reader of the code. So, write a minimal struct with equality and qHash() instead. Change-Id: I9514c9b7d6c2cc6a4831f9ca83ca2ee466d91553 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove winrtOliver Wolff2020-06-066-655/+17
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QAbstractFileIconEngine into QtGuiTor Arne Vestbø2020-06-036-236/+7
| | | | | | Task-number: QTBUG-83255 Change-Id: Iab502c51600b96f315113b08fa473ed28a5457fc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows: Fix QPainter warnings when using some fontsEskil Abrahamsen Blomfeldt2020-06-031-0/+3
| | | | | | | | | | | | | | | | | | | Some fonts, like Segoe UI, have empty glyphs defined for characters such as space. When there is a margin on the glyphs, we would previously render them as 4x4 completely transparent images. This is a waste of time, and in the case of DirectWrite, we fixed it in bb67c3b68b00fb2075a971f4f0d58e1867ef7128 so that it will always return an invalid image when the glyph does not have dimensions. But since we did not account for this in alphaMapBoundingBox(), the texture glyph cache did not detect this case and would request the empty image and try to add it to the cache. Fixes: QTBUG-84629 Pick-to: 5.15 Change-Id: I470a4a55577c5e9239bf77de81c2b381bf8e6a49 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Move QtAccessibilitySupport into QtGuiTor Arne Vestbø2020-06-029-226/+2
| | | | | | Task-number: QTBUG-83255 Change-Id: Ibc1b38e77c3c90030a832c41f4de65c6c38bc91d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* MetaObject: Store the QMetaType of the methodsFabian Kosmale2020-06-023-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This does the analog of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 for the methods we care about (signals, slots, Q_INVOKABLEs). In addition to the actual QMetaType, we store an array with offsets so that we later can do a mapping from methodIndex to metatype. The newly added QMetaMethod::{return,parameter}MetaType methods can then be used to retrieve the metatypes. This does however require that all involved types are complete. This is unfortunately not a feasible requirement. Thus, we only populate the metatype array on a best effort basis. For any incomplete type, we store QMetaType::Unknown. Then, when accessing the metatype, we fall back to the old string based code base if it's Unknown. Squashes "moc: support incomplete types" and "Fix compile failures after QMetaMethod change" Fixes: QTBUG-82932 Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Regenerate src/platformsupportAlexandru Croitor2020-05-296-52/+58
| | | | | Change-Id: If7b5359c457edee814dc7d3a71cf47ce052e6c5e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move QtPlatformCompositorSupport into QtOpenGLTor Arne Vestbø2020-05-2810-1410/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move windowsuiautomation API support into QtGuiFriedemann Kleint2020-05-2716-1862/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Ibface71931b6384494842ba9744d76f738c5ca85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move CoreText font engine/database to QtGuiTor Arne Vestbø2020-05-278-2178/+1
| | | | | | Task-number: QTBUG-83255 Change-Id: Id34ed1759fdebbb1d09e51009f0370736002167c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move FreeType font engine/database to QtGuiTor Arne Vestbø2020-05-2718-2817/+14
| | | | | | Task-number: QTBUG-83255 Change-Id: If6be7057d6bd25b34acd99e18658744161985ed0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix various offset issues with DirectWrite font engineEskil Abrahamsen Blomfeldt2020-05-271-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 318a991907b6c08f52786160bafea1e30d3ad9bd and its follow-up commit beede51bca1a43befe42499ad784af57d2450162. This fix was incorrect and caused regressions elsewhere (QTBUG-84357) The issue in QTBUG-71928 (offsets on emojis) turned out to be much simpler: The emojis are expected to be drawn without any margin, but since we retrieved the margin for A32 there would be a mismatch between the margin used for positioning and the actual margin in the returned QImage from the font engine. Passing the correct margin in bitmapForGlyph() fixes this. But reverting these fixes reintroduces a clipping bug when using software rendering in Qt Quick: QTBUG-80180. This needs to be addressed in Qt Quick. It also exposes an existing issue with positioning in Qt Quick NativeRendering: QTBUG-84454. In addition, it caused an assert when running with ClearType disabled, which turned out to be because we were using the A32 margin in the A8 case in the DirectWrite engine. This was also the cause of QTBUG-50024 before, which is now also fixed. However, it also needs to work with Qt Quick, where the text is currently offset by margin * dpr and glyphs are clipped with the software renderer, possibly because of the offset in position. Task-number: QTBUG-71928 Task-number: QTBUG-84042 Task-number: QTBUG-80180 Task-number: QTBUG-84454 Fixes: QTBUG-84357 Fixes: QTBUG-50024 Pick-to: 5.15 Change-Id: I2c8f9f9e7dfb34d492e9833a02fa0c93e6a19513 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows: Fix wrong DPI used in font size after changing scalingFriedemann Kleint2020-05-252-11/+10
| | | | | | | | | | | | | | | | | QWindowsFontDatabase::defaultVerticalDPI(), which was used for converting the point sizes was missing an updating logic for scaling changes. When implementing it, it turned out that the value obtained from GetDC(0) does not adapt to scaling changes. Remove the function and set it from the screen manager directly to the DPI of the primary screen. Pick-to: 5.15 Task-number: QTBUG-82267 Change-Id: If05ebc893fe78a9461500aba97f2dc127cdf4406 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>