summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoascreen.mm
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Make screen property changes more verbose and granularTor Arne Vestbø2018-08-031-5/+15
| | | | | | | | We only update the properties that have actually changed. Change-Id: If711530c6118d2550d5a0e968ee02c903b44fd04 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Deliver update request via CVDisplayLink if swapInterval > 0Tor Arne Vestbø2018-07-071-0/+204
| | | | | | | | We use GCD for marshaling the display link update over to the main thread, as Qt requires that the update request is delivered there. Change-Id: I318a5b8f27dc5094ce71244401308a4044c41b39 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Cocoa QPA: Clean up 0 as pointerGabriel de Dietrich2018-04-191-2/+2
| | | | | | | | We use nil for Objective-C null pointers and nullptr everywhere else, including CoreFoundation and similar opaque types. Change-Id: Id75c59413dec54bf4d8e83cf7ed0ff7f3d8bb480 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Provide helper property for resolving the display ID of a screenTor Arne Vestbø2018-03-201-2/+10
| | | | | Change-Id: I144bd33a2c122d53ea1435a53483a3d8b46fd093 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-231-13/+16
|\ | | | | | | Change-Id: I01dfc41e18333ac55954296cef8f01475adab27e
| * Cocoa: fix grabWindow when mixing highDPI and non-highDPI screensPablo Marcos Oltra2018-02-221-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CGDisplayCreateImageForRect seems to have a weird behavior when mixing highDPI and non-highDPI screens since it may take part of the non-highDPI screen when the highDPI display is at the left or at the top of the main monitor. To workaround this issue, we capture the whole screen and then crop the image to the desired size. Task-number: QTBUG-47643 Change-Id: Ib2a3850a0a549964c7fe272abb563bd23518c234 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Clean up our Objective-C usageJake Petroules2018-02-201-1/+1
|/ | | | | | | | | | | | | | | | - Move ivars into @implementation - Use instancetype where applicable - Use dot notation for property access - Use subscript operator for dictionaries and arrays - Format selectors consistently - Use proper style for init methods - Use generics instead of void pointers where possible - Use "range for" loops instead of indexing - Replace or replace IBAction/IBOutlet with void Change-Id: I1667812a51d4dfe44ae80fe337cb1f4bc9699d92 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-231-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * macOS: Add logging of screen add/remove/changesTor Arne Vestbø2017-11-041-0/+18
| | | | | | | | | | Change-Id: Ic9c9ac307441dde98bb43d656466a03805746917 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Simplify helpers for flipping between quadrant I and IVTor Arne Vestbø2017-11-081-43/+29
| | | | | | | | | | | | | | | | | | | | | | | | The different flip-functions have been replaced by a single function, qt_mac_flip, with overloads for points and rects. This function is primarily used to implement QCocoaScreen::map(To|From)Native, which most clients of qt_flip* have been moved to. This makes it clearer what kind of reference geometry we're flipping in relation to, and simplifies call-sites. Change-Id: I8a0862f94bb2c64a83a1c3168f984a195c0af6db Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Replace deprecated CGDisplayIOServicePort functionTor Arne Vestbø2017-11-081-6/+33
|/ | | | | | | | | There's no replacement function from Apple's side, so we have to iterate the available displays and pick the right one based on the vendor, product and serial number. Change-Id: I437bee06bc6826c3214a701cd2c65f6109eeb3e7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Split QCocoaScreen out from qcocoaintegration.mmTor Arne Vestbø2017-10-051-0/+278
It's confusing to keep it along with an unrelated class. Let's keep it in its own file like for most other platform plugins. Change-Id: I449ee061ff9fd5dc7ef06cadd633414d6b16358f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>