summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-01-073-7/+14
|\ | | | | | | Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-063-7/+14
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qvariant.h Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
| | * macOS: Skip uninitialized buffers in IOSurface backingstoreTor Arne Vestbø2020-01-031-2/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-80972 Change-Id: Ifb8eb84d6b802556ccd52ac129a91e142e265a81 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * macOS: Handle missing color space information in IOSurface backingstoreTor Arne Vestbø2020-01-031-3/+10
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-80972 Change-Id: Iab3f1a9cf03251340e5f32bcc73103428e93282d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Remove commented out code added by mistake in 7ac4e55cb979dTor Arne Vestbø2020-01-021-2/+0
| | | | | | | | | | | | | | | Change-Id: Ibd53518be9d2b29dd880912bdb81c06435543789 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-049-100/+259
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-276-31/+33
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/platforms/xcb/qxcbscreen.cpp src/widgets/accessible/qaccessiblewidget.cpp Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
| | * macOS Don't throw away backingstore buffers when backing properties changeTor Arne Vestbø2019-12-235-30/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clients such as QtWidgets that do their own dirty tracking will assume they can just flush in response to the expose event, without repainting anything. Since we have no way at the moment to inform these clients that the backingstore content might be invalid we can't just throw it away. It turns out that to pick up changes in color spaces we can just tag the existing buffers with the new color space, so we don't need to throw it away. And for the older surface-backed mode we tag the color space on flush, so we didn't need to invalidate anything in the first place. Fixes: QTBUG-80844 Task-number: QTBUG-77749 Change-Id: Icb1ceb178894bb43887cdf03fb855d2d614b5ab0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * macOS: Deliver theme changes synchronouslyTor Arne Vestbø2019-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the expose event that AppKit triggers will be delivered before we've propagated the theme change, and we fail to draw the UI using the new theme. Change-Id: I502122a2bf02a866d136106d831f0c2a0dfe26f2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-162-68/+225
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket.cpp src/widgets/kernel/qapplication.cpp Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
| | * Merge remote-tracking branch 'origin/5.14.0' into 5.14Qt Forward Merge Bot2019-12-132-68/+225
| | |\ | | | | | | | | | | | | Change-Id: I03927d2ef75514e4f2633839387806125d8954f1
| | | * macOS: Harden screen handling logic when reconfiguring displaysTor Arne Vestbø2019-11-292-68/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When connecting/disconnecting/reconfiguring screens Qt needs to know about the changes before they are propagated by the OS in other ways, so that we can reflect the changes in the list of QScreens as soon as they happen. Unfortunately the canonical notifications for this in AppKit, NSApplicationDidChangeScreenParametersNotification, is delivered after AppKit itself reacts to the change, which results in receiving NSWindowDidChangeScreenNotification, NSWindowWillMoveNotification, and others, while the list of QScreens is stale. To work around this we adopted the lower layer Quartz Display Services API in 3976df2805 to notify us when there are changes to the screen configuration. Unfortunately the window server on macOS is not consistent in how it orders events during screen reconfiguration, and we can't rely on the NSScreen list being up to date when we get our callbacks from Quartz. To work around this we still hook into Quartz, so that we get the callbacks as early as possible, but then track the state of the AppKit NSScreen list and update our own QScreens as soon as we see a change. We now also include sleeping displays in the list of QScreens, which matches the behavior of NSScreen.screens. Similarly we exclude displays that are mirroring another display. Task-number: QTBUG-80193 Change-Id: I6b1958d6ee61373b2861e05a0d971d2300596f3e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | | Avoid initializing QFlags with 0 or nullptr in macOS-specific codeFriedemann Kleint2019-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is being deprecated. Change-Id: If1b0b058140e197d41efae93025c4eefc2ed9bbd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-119-7/+83
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
| * | | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Liang Qi2019-12-105-2/+55
| |\ \ \
| | * | | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-105-2/+55
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| | | * | Move the tooltip out of the way of very large mouse cursorsVolker Hilsheimer2019-12-092-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users that have large mouse pointers configured in their settings can not see tooltips, as they are obscured by the pointer. Native applications on Windows and macOS have the same problem, which includes the tooltips for the minimize/maximize/close controls in the window frame of e.g. Explorer. Introduce QPlatformCursor::size that returns a value that is based on the user's settings, or a default value. We can then use that value to move the tooltip out of the way. On Windows, the calculation of the cursor size is based on experimenting with the settings, which are in logical independent pixels. The placement of the tooltip attempts to keep existing behavior, and to not end up with a tooltip that's very far away from the tip of the arrow even for very large mouse cursors. [ChangeLog][QtWidgets][QToolTip] Make sure that the tooltip is not obscured by very large mouse pointers on Windows and macOS. Change-Id: I8e13b7a166bfe8b59cef4765c950f90fefeaef9d Fixes: QTBUG-79627 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * | macOS: Improve QCocoaGLContext loggingTor Arne Vestbø2019-12-052-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I27d0abe0eb5b0f0ba64b8787b430484c48b131c0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * | macOS: Enable fullscreen for windows by defaultTor Arne Vestbø2019-12-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This matches the default collection behavior of NSWindows. Change-Id: I363ed211daf6c6c2e579eb11c7294ff509d53e91 Fixes: QTBUG-63829 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | | QCocoaEventDispatcher: make 'interrupt' workTimur Pocheptsov2019-12-102-2/+21
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | even if we are currently inside processEvents (apparently called manually and not from QEventLoop::exec()). A carefully crafted application (see, for example, the linked QTBUG or even updated auto-test) can trigger itself into failing to exit the current (potentially nested) event loop. We can harden our Cocoa event dispatcher to detect such condition and properly propagate 'interrupt' to where it'll do its job, indeed, interrupting the real event loop (aka [NSApp run]). This mainly means we have to undo what bool blocker would erroneously do. Also, long live (as people love to say these days) to another tricky (somewhat) auto-test (surely, it's not flaky!). Fixes: QTBUG-79477 Change-Id: I794f0cda23e24d36be67f2bb63d52b74be057c31 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | macOS: support copying lazily provided data to the clipboardVolker Hilsheimer2019-12-102-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using always EagerRequest type forces the application to provide the data at copy or drag-begin time, even though the data might never be requested (pasted or dropped into another application). For data that is expensive to generate, this is wasteful, and on other platforms Qt uses the functionality provided by the native clipboard to allow for on-demand retrieval of data. Changing the request type to LazyRequest for the cocoa clipboard works, but then we need to make sure that we resolve all promises at shutdown time so that the data is available (which is what the end user expects). Commit ad0d2f463a0905c4705660d96e8a514539c51d36 disabled this for lazy requests to prevent crashes when using drag'n'drop, where the QMacPasteboard object is short-lived and stack allocated. We definitely don't need to worry about lazy data that is not yet retrieved at the end of a drag'n'drop operation, so limit the fix from the previous commit to the drag'n'drop scenario. [ChangeLog][QtGui][QClipboard] Support lazily provided copying of data to the clipboard on macOS Change-Id: Id2203999024a0d9d854d6933d39077cc4af925d0 Fixes: QTBUG-76263 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-049-16/+208
|\| | | | | | | | | | | | | | | Change-Id: I4134c0c6b6c9911950f58b3b5c86e789d28a185b
| * | | Merge remote-tracking branch 'origin/5.14' into 5.15Ulf Hermann2019-12-034-15/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborvalue.cpp Change-Id: I675a3029955c96e81a33ed9d98b72b55b6784b52
| | * | macOS: Don't tweak NSApp presentationOptions on startupTor Arne Vestbø2019-12-031-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AppKit will initialize NSScreens nowadays, so we don't need to manually trigger it. Task-number: QTBUG-80193 Change-Id: Ic0251a1b978b9d4ff53f20e67902787cf529fa87 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | macOS Accessibility: Fix role for comboboxesPeter Varga2019-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise combobox with editable text field won't work. Change-Id: I135c3a63cf8fba66d724e140a5a63828853e154e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | macOS: Replace use of deprecated acceptsTouchEvents APITor Arne Vestbø2019-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The equivalent of setting acceptsTouchEvents to YES is enabling indirect touches. Direct touches are enabled by default by AppKit, but can be explicitly disabled by clearing the NSTouchTypeMaskDirect bit. Change-Id: I5ba09d36f6ee2ce962e3ce21bab06537dd1fa5ad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | macOS: Replace use of deprecated NSDragPboard enumTor Arne Vestbø2019-11-251-2/+2
| | |/ | | | | | | | | | | | | Change-Id: I90128abe310f971a89ecb6551e31950211adda77 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Session management for macOSSamuel Gaist2019-12-026-1/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to implement the session management available on macOS. Currently applicationShouldTerminate is just a go through that closes everything and ends the application. The new implementation calls first appCommitData and cancels the termination properly if required. This means that if a user wishes to logout, Qt applications can now cancel that like e.g. answering to Safari asking whether it is ok to close because of a number of opened tab/window. Fixes: QTBUG-33034 Change-Id: Id5d7416cb74c762c5424a77c9c7664f0749da7f6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-252-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * | Make QObjectPrivate::threadData a proper atomicGiuseppe D'Angelo2019-11-132-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QObjectPrivate::threadData used to be a QThreadData *, and was read and written from multiple threads without proper synchronization. As an example, it was read from QCoreApplication::postEvent and written from QObject::moveToThread, therefore causing UB. Port threadData to a proper atomic, removing the races. Fix all usage points. In general, QObject is documented to be simply reentrant, not thread-safe, and certain bits (e.g. timers, moveToThread) are not even reentrant. The reasoning therefore is that a given QObject's threadData is not supposed to be touched by multiple threads without some synchronization happening elsewhere, and therefore relaxed loads should be sufficient. As drive-by change: refactor QCoreApplication::postEvent. It was particularly subtle, because it had a loop using a volatile to cope with the possibility of the receiver object switching thread while we tried to lock its thread's event queue. However, volatile does not achieve any synchronization, so drop it, and refactor the algorithm using better locking primitives. Put this algorithm in a common place, and also reuse it from removePostedEvents, which was lacking any synchronization. Change-Id: Icc755f7eb418ff54b33db4bdd87fd8eaf4e82c7a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-021-9/+0
|\| | | | | | | | | | | Change-Id: I256a4b0bac4d2f5eb170967fedc4eccaec8c7f2a
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-011-9/+0
| |\| | | | | | | | | | Change-Id: Ic13ef00d76c81295076bb2432576db70ec84fe29
| | * macOS: Don't skip display link delivery via GCD during live resizingTor Arne Vestbø2019-10-301-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | We now avoid flushing GL if the exposed size does not match the window size, so we don't need to halt update request delivery during resize. Change-Id: Iaa89e67d50c987757a586b5958e08edf71a5dd0c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-011-11/+0
|\| | | | | | | | | | | Change-Id: I68a6ed3184e62fa89c47c564bb01002c0918d0fd
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-301-11/+0
| |\| | | | | | | | | | Change-Id: Ib4df563fc7b1f7c40f425e0e71180d9517a672be
| | * macOS: Deliver update requests even when view or layer needs displayTor Arne Vestbø2019-10-281-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was a workaround to prevent visual artefacts from flushing GL during window resizing, but now that we skip the flush entirely in this situation we don't need to limit the update request delivery. Change-Id: I84bd48e4e2fc5a03e9d27d5f9b4b32b8098e56a5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-303-52/+75
|\| | | | | | | | | | | Change-Id: I7f11733bda960196a96c6452bdabeb7072a8430d
| * | Cocoa: rename IsMouseOrKeyEvent -> isUserInputEventMorten Johan Sørvig2019-10-291-36/+32
| | | | | | | | | | | | | | | | | | | | | | | | This matches the intended use of this function. Reformat to modern Qt style. Change-Id: I076d2bdb3ac14b346f0dc6934f7a47765badc6b0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-282-16/+43
| |\| | | | | | | | | | Change-Id: I7803400aa500363fbaa57b0661315064bd3239d9
| | * macOS: Only skip screen reconfigure if primary screen changedTor Arne Vestbø2019-10-271-3/+2
| | | | | | | | | | | | | | | Change-Id: Ia5d208ace5086e8e92f95f859383773894a18768 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * macOS: Extend QCocoaScreen loggingTor Arne Vestbø2019-10-271-3/+31
| | | | | | | | | | | | | | | Change-Id: I91f89ff336b3f48aea91e50860264bd8359805cb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * macOS: Class initialize QCocoaScreen membersTor Arne Vestbø2019-10-272-5/+5
| | | | | | | | | | | | | | | Change-Id: I163858400da28668b8a85241e9e6b1d989227a3e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * macOS: Don't leak CFUUIDRefs when resolving NSScreen for platform screenTor Arne Vestbø2019-10-271-1/+1
| | | | | | | | | | | | | | | Change-Id: I5609071346ef44dc9f16359db451ea9b29dd2b0d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * macOS: Remove assert that primary display always matches CGMainDisplayIDTor Arne Vestbø2019-10-271-4/+4
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-78707 Change-Id: Ia517f543728c76dcf19558e9e68ed97db7cfaaa4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-265-67/+70
|\| | | | | | | | | | | Change-Id: I379794a01cbf6fb39d94b24cc8c90b1971a212b9
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-254-36/+52
| |\| | | | | | | | | | Change-Id: Iebedaa967a263854f18cd403ce007d7965f26d2b
| | * macOS: Don't set NSOpenGLPFANoRecovery for layer-backed viewsTor Arne Vestbø2019-10-241-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | The Apple software renderer is perfectly capable of being used when compositing CA layers. Change-Id: I3b78ff61a79869ecdb7bd431388041f2c124472e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * macOS: Respect Qt::AA_UseSoftwareOpenGLTor Arne Vestbø2019-10-241-0/+6
| | | | | | | | | | | | | | | Change-Id: Ia83e8e9e571e4f46d2a8d810c376015552755457 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * macOS: Skip NSOpenGLContext flush if window exposed size is out of syncTor Arne Vestbø2019-10-241-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some clients such as QOpenGLWidget will end up drawing and flushing during the resize event, which for GL will result in an immediate update on the screen. The problem is that the underlying Core Animation layer, and the window's frame, has not been visually updated yet to the new size, so we end up drawing "ahead" of what the window server is showing the user. Ideally we'd be able to present the GL drawing in a transaction, in sync with the drawing of the window frame, but this API is only available for CAMetalLayer and CAEAGLLayer. As a workaround we detect when the exposed size is out of sync with the window geometry, and skip the flush until the exposed size has caught up. We know this will happen eventually as AppKit will always ask us to display after a resize. Change-Id: I1739ac8878b3fc6820a55dd017ddd170fd5f55d6 Fixes: QTBUG-79139 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * macOS: Improve handling of wantsBestResolutionOpenGLSurfaceTor Arne Vestbø2019-10-243-30/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were disabling wantsBestResolutionOpenGLSurface whenever we detected the Apple software renderer, but this isn't needed when layer-backed, and did in fact result in the exact same visual result as the bug the code was working around -- only rendering to a quarter of the viewport. We now apply the workaround only when software rendering is combined with surface-backed views. The logic has also been improved to not rely on string comparison to look for the software renderer, but instead uses the renderer ID that the context provides. Since tweaking the wantsBestResolutionOpenGLSurface is only relevant when using a window for GL rendering the logic has been moved into QCocoaGLContext. Change-Id: I021aaefbb7a9782bc8ee3c9703da246510326d50 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>