summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
Commit message (Collapse)AuthorAgeFilesLines
* Revert "macOS: Force light theme on macOS 10.14+"Morten Johan Sørvig2018-09-031-21/+0
| | | | | | | | | | | | | | | | | This does not really work: as soon as you build with the 10.14 SDK you opt-in to having updated palette management, which the Qt 5.11 series does not have. This leaves app developers with two ways to opt-out of dark mode: - Build with the 10.13 (or earlier) SDK. - Set NSRequiresAquaSystemAppearance in Info.plist This reverts commit 04671a80db32bd7fce470c50934cf60f2e8ffa70. Change-Id: I5c01b9965da45de914f699526ba0723837f36e1d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Force light theme on macOS 10.14+Gabriel de Dietrich2018-08-091-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Until we can properly fix QPalette and QMacStyle, we should disable dark appearance in Qt applications. Disable by setting NSApp.appearance to Aqua, unless dark mode support has been requested via Info.plist or environment variable. Read the NSRequiresAquaSystemAppearance Info.plist key, don’t set NSApp.appearance if its value is false. Also check the QT_MAC_REQUIRES_AQUA_SYSTEM_APPEARANCE environment variable and apply similar logic. You then enable dark mode support by setting: QT_MAC_REQUIRES_AQUA_SYSTEM_APPEARANCE=0 which is slightly awkward, but matches Info.plist behavior. Task-number: QTBUG-68891 Change-Id: I86dc6cf3dee951d46c953396c57d2c31f2e4afcc Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Don't blend the backingstore unless the window has a backgroundTor Arne Vestbø2018-08-071-5/+5
| | | | | | | | | | | | | If there's no background, we should copy the backingstore, so that the backingstore is not blended with the result of the previous flush. The unified toolbar case is covered by the window having a textured background. Task-number: QTBUG-69773 Change-Id: I2f4eed9f44a60ebe7495ce68cf5a54d3d2424b0c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Update window geometries after screen properties changeTor Arne Vestbø2018-08-071-0/+14
| | | | | | | Task-number: QTBUG-69794 Task-number: QTBUG-68140 Change-Id: I4d33bc2136478d779cc4ae8170c3421d9a7557cc Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* QCocoaMenuLoader - ensure that ensureAppMenuInMenu indeed, ensuresGabriel de Dietrich2018-08-011-18/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The logic seems to be incorrect (or the naming is misleading): it only adds 'appMenu' if it was found in the previous 'mainMenu', failing otherwise. Consider the following example: while (true){ QApplication app(a,b); MainWindow w; w.show(); app.exec(); } It's quite a contrived but apparently allowed API use (OP claims they have to switch languages in their app). The main window and the app are destroyed, so is the menu bar. Then a new main window is created, with a new menu bar. Now the current [NSApp mainMenu] (the one set after we deleted the previous) does not have 'appMenu' anymore (we removed it when initializing the first menu bar). So as a result we have app menu missing and add new menus/items to a wrong menus/at wrong index. Change-Id: I64fce766d6c12ebf7ae12bb94af41c8c1de3d78b Task-number: QTBUG-69496 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Ensure all windows are created on a valid screenTor Arne Vestbø2018-07-051-13/+18
| | | | | | | | | | | | | | | We rely on AppKit repositioning the window if the original position is not on any of the available screens. We do this by keeping the original position, but using the primary screen as reference. This doesn't work unless the window has a title bar, so in the corner case where the window has an invalid position, we apply the title bar style mask for a brief moment, so that AppKit will place the window correctly. Task-number: QTBUG-69221 Change-Id: If66cac36bf36f051570ba5854951ce4504fe771f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Guard non-reentrant uses of NSOpenGLContextTor Arne Vestbø2018-06-271-0/+5
| | | | | | | | | | | | | | | | | | | NSOpenGLContext should be re-entrant, but is not in practice, resulting in deadlocks when there are two render threads, eg: thread #23, name = 'QSGRenderThread' frame #0: 0x00007fff5c6dda4e libsystem_kernel.dylib`__psynch_mutexwait + 10 frame #1: 0x00007fff5c8a5b9d libsystem_pthread.dylib`_pthread_mutex_lock_wait + 83 frame #2: 0x00007fff5c8a34c8 libsystem_pthread.dylib`_pthread_mutex_lock_slow + 253 frame #3: 0x00007fff31ebb52e AppKit`flush_notify + 110 frame #4: 0x00007fff3e75ee2a GLEngine`glSwap_Exec + 186 frame #5: 0x00007fff3e740797 OpenGL`CGLFlushDrawable + 59 frame #6: 0x00007fff31ad43ac AppKit`-[NSOpenGLContext flushBuffer] + 27 ... Task-number: QTBUG-69040 Change-Id: I6f28b4cc5faf61ae93f66353ce2abdf8c223d994 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Cocoa: handle WindowMaximizeButtonHint as wellMorten Johan Sørvig2018-06-211-0/+2
| | | | | Change-Id: I6af265d48e83fc3fc0ce86903820c2b37db05f03 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cocoa: Tool windows should always be resizableMorten Johan Sørvig2018-06-211-1/+4
| | | | | | | | | | | | | | | | | | | | Undocked dock windows have the following flags: Tool|X11BypassWindowManagerHint|WindowTitleHint| WindowSystemMenuHint|CustomizeWindowHint|WindowCloseButtonHint CustomizeWindowHint with no WindowMaximizeButtonHint means that we disable window resize in order to remove the zoom button (this is perhaps questionable, but is established behavior). That will however break dock windows: add exception for Qt::Tool. After refactoring we discover this special case, again. See previous fix in d37643c43. Change-Id: I67a09341e75b92fdb3108ea93901295c39107fe1 History-repeats: QTBUG-46882 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* cocoa: Don’t trigger security dialog on dragMorten Johan Sørvig2018-06-211-1/+5
| | | | | | | | | macOS 10.14+ will display an “Accessibility Access” security dialog if we generate mouse events, so don’t. Task-number: QTBUG-68830 Change-Id: If832ca3cd49ec6bdad1a8188feab884b6562e9d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Manually compute frame rect for zoomed/maximized stateTor Arne Vestbø2018-06-051-11/+24
| | | | | | | | | | | | | | | | | | We cannot rely on AppKit to compute the zoomed frame for us, as it will not allow borderless windows to be zoomed, and also has bugs in corner cases with multiple screens, where the zoomed window jumps from the current screen to a nearby screen. The latter happens when the zoomed rect overlaps more with a nearby screen than it does with the current screen. In this case AppKit zooms the window on the nearby screen, but this is unexpected from the user's perspective, who zoomed the window on the current screen, so we make sure to always keep the window on the current screen by repositioning the window correspondingly. Task-number: QTBUG-67543 Change-Id: I8762c5cbf2e3b317a6caf11d820712596e15114a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Allow moving out of fullscreen state using titlebar buttonTor Arne Vestbø2018-05-301-1/+1
| | | | | | | | | | | | Even if the window isn't configured with Qt::WindowFullscreenButtonHint, the user might call showFullScreen(), which we respect and move the window into fullscreen. In this state, we need to keep the collection behavior as NSWindowCollectionBehaviorFullScreenPrimary, otherwise the zoom button will have no effect and the user can't move out of fullscreen. Change-Id: I77a4b4ee4b42fabc4c6ed2f529ff57acc31d6c24 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-291-0/+1
| | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* macOS: Respect maximum window size when computing zoomed state geometryTor Arne Vestbø2018-05-291-7/+17
| | | | | | | | | | | | | | | | | | | | | AppKit will normally compute this automatically based on the contentMaxSize property of the NSWindow, which we set correctly based on the window's maximum size, but since we ignore the frame proposed by AppKit (due to not working for borderless windows), we need to take the maximum size into account ourselves. We follow the lead of QCocoaWindow::propagateSizeHints(), and interpret the window's maximum size as referring to the client area size, not including the frame geometry, but AppKit expects the NSWindow's frame, so we need to manually add the frame. In addition, AppKit expects the frame in the native coordinate system, so we need to map to it. This was an existing bug, that never manifested before taking the maximum size into account. Task-number: QTBUG-67376 Change-Id: Id4cf6ff5640610f809472e5b1d591b4ec17df602 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: ensure mouse events from the global monitor has the correct button setRichard Moe Gustavsen2018-05-032-3/+13
| | | | | | | | | | | The global monitor will be used when popup windows are visible to catch all mouse events. But only certain kind of NSEvents has a buttonNumber set to something useful. So we need to check for this case before we create a QPA event. Task-number: QTBUG-60887 Change-Id: I5631c76ae82b8bfd232642036a08b5a8a29491c7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* If the page size is not valid on the new printer, set a custom sizeAndy Shaw2018-05-021-1/+13
| | | | | | | | | | | When the page size was not valid on the new printer, it would end up having the wrong page size name on the new printer. What should happen in this case is that it should set the originally set page size as a custom page size on the printer instead. Task-number: QTBUG-62221 Change-Id: Iaca34ae262f5d0685ca60e4ca4b38229a2283289 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* macOS: Don't trigger deferred needsDisplay when using timer-based requestUpdateTor Arne Vestbø2018-05-021-1/+1
| | | | | | | | | | | | We've reverted to using the default timer-based request-update mechanism for now, so the code in [QNSView updateRegion:] needs to ensure it's only triggering a deferred needsDisplay if requestUpdate was done via the (now disabled) [QNSview requestUpdate], which uses setNeedsDisplay. Task-number: QTBUG-68048 Task-number: QTBUG-68047 Change-Id: I0421a32773908daa0f1be0075f4f2d25c90c8aea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Show high DPI custom cursor on macOSFrederik Christiani2018-04-261-0/+1
| | | | | | | | | | | | | | | | | Set the devicePixelRatio to 1 on the scaled down pixmap. A scaled down version of the high DPI pixmap is added to the NSCursor in addition to the high DPI one, but the devicePixelRatio must be set correctly on the smaller of the two for macOS to pick the right image to use on a high resolution display (retina). This change also fixes the problem that only a high DPI custom cursor with a hotspot in the upper left quadrant is applied by macOS. I suspect that the NSCursor was discarded by macOS, because the hotspot was outside the device independent bounds of the smaller scaled image. Task-number: QTBUG-52211 Change-Id: I7e552e8f62f5255dd3786da44b2f619f6790c37a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Cocoa: Don’t starve the event loop on requestUpdate()Morten Johan Sørvig2018-04-241-1/+1
| | | | | | | | | | | | | | | | | Some of our examples, and perhaps also some applications, call requestUpdate() immediately after producing a frame. This can cause Cocoa to immediately start (trying to) draw a new frame without processing e.g. input events. This should (and will) be handled by rate limiting updates with CVDisplayLink. In the mean time fall back to using the base class QPlatformWindow implementation, which is implemented using a timer, which will allow for input event processing. Change-Id: Ic2541f344b2f4018d785404a06274959a7bad2df Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QCocoaFontDialogHelper: Fix NSFontManager delegate warningGabriel de Dietrich2018-04-241-4/+3
| | | | | | | | | According to Apple's documentation, there's no delegate in NSFontManager. We set its target instead. The action is changeFont: by default. Change-Id: I8c01bfa97c78dd8097f38c27353748d13f51489f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QCocoaWindow: Fix handleMouseEvent() compilation warningGabriel de Dietrich2018-04-241-1/+3
| | | | | | | | | qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm:408:53: warning: 'handleMouseEvent<QWindowSystemInterface::DefaultDelivery>' is deprecated [-Wdeprecated-declarations] QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint, Change-Id: Ifbf8c46e31a1de2089ce0e16cec087fdd9adb64e Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* QCocoaPlatformTheme: Fix tooltip background colorGabriel de Dietrich2018-04-181-1/+3
| | | | | | | | It use to be yellowish in the past, but modern versions of macOS show it light gray. Change-Id: I8cca5cbb37c73a6dfc79e633a746b9a7d7bced05 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Do not ignore MenuItem on macOSJan Arve Saether2018-04-181-1/+0
| | | | | | | | | | | The idea was probably to ignore it since macOS already provides accessibility for a menu item in its native system menu. However, a Qt Quick Controls2 Menu will instead show a non-native menu, which should not be ignored. Task-number: QTBUG-63522 Change-Id: Ib5ae16ad991ebd7a18fa73b8f576f20b1c14d4c8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Cocoa: Make QMacNativeWidget paint correctlyMorten Johan Sørvig2018-04-031-3/+5
| | | | | | | | | | | | | QWindows with transparent pixels (of which QMacNativeWidget is an example) must be composited, even if they are content views. This will display the NSWindow background instead of solid black for the areas where the Qt backingstore has transparent pixels. Change-Id: Ibee1327e11bc64975900b4c5d632dd5f103da4c8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Handle NaN mouse event positionsNathan Collins2018-03-211-2/+6
| | | | | | | | | | | | When performing gestures such as Exposé or Mission Control with the mouse button down, the position of the mouse release event is returned with NaN values. This causes QGuiApplicationPrivate::processMouseEvent to be called recursively and ultimately crash. Task-number: QTBUG-67194 Change-Id: If1536bc4dc2075c498cdd6c5afe57c86bdaac13b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cocoa: Restore resizable window mask setting to 5.9 behaviorMorten Johan Sørvig2018-03-211-1/+1
| | | | | | | | | | This should be tied to the CustomizeWindowHint flag: if that flag is set we start out without NSResizableWindowMask and possibly add it later on if WindowMaximizeButtonHint is set. Change-Id: I7e826d4bd357a8a17c60cfef948af25d61b66ebf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QCocoaMenuItem: Make QCocoaNSMenu the item targetGabriel de Dietrich2018-03-075-46/+54
| | | | | | | | | | | | | | | | | Since we made the NSMenu delegate a singleton we could not rely on it to have enough information to implement worksWhenModal. At the same time as the delegate change, we derived NSMenu into QCocoaNSMenu. This allows us to extend the menu functionality and, in this case, serve as target for the Cocoa menu items. We also refactor setting the item's target/action. Manually tested against menurama and bigmenucreator tests, the test-case for QTBUG-17291, and the richtext/textedit example. Change-Id: I222241f71db82611711b23d4a8c6122a741370ae Task-number: QTBUG-66676 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* cocoa: add qCDebug in QNSview::scrollWheelShawn Rutledge2018-03-061-0/+1
| | | | | | | | | If you enable both qt.qpa.input.touch and qt.qpa.cocoa.mouse you can see the order and interleaving of the touch and scroll events. Task-number: QBUG-66329 Change-Id: I8e1a63e2958b85f7964bb597e49cf8529cb3f32e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Warn the user when KVO-observing QCocoaNSWindowTor Arne Vestbø2018-02-281-0/+5
| | | | | | | | | | | | | | | | | | | We recreate the window of our QNSView in various situation such as changing the styleMask, which results in either a new QNSwindow or QNSpanel being set as the window of the view. KVO-observing the window property of the view will fail we then have a new window instance, and will crash when trying to remove the observer from the new window. Unfortunately catching the NSRangeException that happens when removing an observer from a 'switched' window is not possible, so the user is left with: Terminating app due to uncaught exception 'NSRangeException', reason: Cannot remove an observer <Foo 0xabc> for the key path "bar" from <QNSPanel 0xdef> because it is not registered as an observer. Change-Id: Ib2adbb99f19303a054fb1eb65e959aecd32b1162 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Cocoa: Fix incorrect QSystemTrayIcon::geometry()Morten Johan Sørvig2018-02-261-3/+4
| | | | | | | | | | The coordinate conversion was wrong. Use QCocoaScreen::mapFromNative() instead. Task-number: QTBUG-53184 Change-Id: I50f18d68ba5d7e1cb5046523a608bfa2e076d7ea Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* 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>
* Merge "Merge remote-tracking branch 'origin/5.10.1' into 5.11" into ↵Tony Sarajärvi2018-02-201-1/+1
|\ | | | | | | refs/staging/5.11
| * Merge remote-tracking branch 'origin/5.10.1' into 5.11Liang Qi2018-02-191-1/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/sqldrivers/psql/qsql_psql.cpp Change-Id: I070b455078b41e75c46562fcea5676d6218cd00c
| | * QCocoaWindow: be more careful when flushing eventsRichard Moe Gustavsen2018-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing the QPA event queue is problematic since we can then end up delivering several events to Qt (or the app) at the same time on the call stack. This again can easily leave objects in an inconsistent state if they receive callbacks from subsequent events while being occupied processing the first. This is also what happens in the listed report. A QMenu shows a sub menu when the mouse enters a menu item. The show leads to QPA flushing events, which in some cases also includes flushing another pending move event. The move event is delivered to the same QMenu, which will clear a private variable (currentAction). When the show returns, the state of QMenu has unexpectedly changed, which causes a crash to happen since currentAction is null. This patch will fix the root cause of the problem by stopping QCocoaWindow from flushing user input events when the call location does a flush to deliver geometry events. Task-number: QTBUG-66093 Change-Id: Id277550b0a080ad98c81e8c30dc7098dc73723d5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | macOS: Don't assume m_view is QNSView when calling requestUpdateTor Arne Vestbø2018-02-191-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I98833c5ecc5816a0926045e10ef0442a39be6b2e Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | macOS: Remove unused variableTor Arne Vestbø2018-02-191-2/+0
|/ / | | | | | | | | | | Change-Id: I7e016db57cbf347529b6aa003d84585eeab0767d 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 5.11Liang Qi2018-02-154-29/+61
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/corelib.pro src/corelib/global/qrandom.cpp src/network/access/qhttpnetworkrequest_p.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoansmenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/offscreen/qoffscreenintegration.h src/widgets/kernel/qaction.cpp src/widgets/widgets.pro Done-with: Andy Shaw <andy.shaw@qt.io> Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
| * \ Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-071-2/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.mm Change-Id: I11c5f8466c5b51e13e5ef6a8fc6e3f2dd79122a7
| * | | macOS: Share view update code between layered and non-layered modeTor Arne Vestbø2018-02-051-2/+6
| | | | | | | | | | | | | | | | | | | | Change-Id: I8eaf0607c1ede18ed20180fd43cc93744c99962d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-021-4/+8
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp Change-Id: Ia28ea4f29d308ba3aa16c2a86ffc57049c6ea590
| * | | Merge remote-tracking branch 'origin/5.10.1' into 5.10Liang Qi2018-02-013-27/+39
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: Ibbe355f5e8ef12e5ffeb4e33b6a80760c3e2b464
| | * | | macOS: Handle update requests via setNeedsDisplay more carefullyTor Arne Vestbø2018-02-013-27/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of trying to detect situations where we need to send a real expose event instead of an update request in response to a drawRect call, we keep track of when we've asked the view to display due to a requestUpdate call, and only deliver the corresponding drawRect as an update request if no other code has asked the view to display. This should cover all cases of asking the view to display, issued from our code or from AppKit, such as the view changing its backing scale factor, or otherwise needing a real expose event. Task-number: QTBUG-65663 Change-Id: I1783787823aee889dad8e48f34a1cb0f1b7b06bd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-291-2/+0
| |\ \ \ \ | | |/ / / | |/| | | | | | | | Change-Id: I6b40ecee4db13e6329e7a0433b57c5bca473c63f
| * | | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-261-0/+18
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I7bfb75083f60190aa1def82d153f89925a92fd56
| * | | | | Cocoa: Make dialogs non-resizable againMorten Johan Sørvig2018-01-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression from commit 8b3a120a where also dialogs got NSResizableWindowMask, making them have a Zoom button. Task-number: QTBUG-65668 Change-Id: I21054b3aa6fc11eab3d93f78ede44ae771522e2c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | | | Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-144-8/+31
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * | | | | macOS: fix menu positioning on high-DPIJ-P Nurmi2018-02-051-2/+4
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The target position is passed in physical native pixels, so call QPlatformScreen::availableGeometry() and QPlatformWindow::mapToGlobal() instead of QScreen::availableSize() and QWindow::mapToGlobal(). The latter two operate on logical pixels. Task-number: QTBUG-55251 Change-Id: I281f47baee727bc0f4738fd6d6cdf12c9f462b0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | | Fix QFileDialog::defaultSuffix on macOSNathan Collins2018-02-011-4/+8
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't prepend the default suffix to the NSSavePanel allowedFileTypes. "If no extension is given by the user, the first item in the allowedFileTypes array will be used as the extension for the save panel." The user expects to get the suffix displayed to them in the drop down filter, not the default suffix set by the developer. Apply the default suffix if neither the user or the NSSavePanel provide a suffix. Task-number: QTBUG-66066 Change-Id: I64093b9f3178bd2377a7b65d6f23aed6214a4119 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | | Remove traces of Growl in QSystemTrayIcon code and documentationKonstantin Tokarev2018-01-261-2/+0
| | |/ | |/| | | | | | | | | | | | | | | | Growl support was removed in Qt 5.8. Change-Id: I00a36cd955194ca8ceee52841a89ca579da01284 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | Cocoa: Explicitly hide popup windows when the application is hiddenAndy Shaw2018-01-251-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the application is hidden then Qt will hide the popup windows associated with it when it has lost the activation for the application. However, when it gets to this point it believes the popup windows to be hidden already due to the fact that the application itself is hidden. As a result, when the application is restored it causes a problem with the still visible popup window as it is taking the input events without responding to them. Therefore we need to explicitly hide the windows right before the application is hidden to ensure that they are actually hidden correctly. Task-number: QTBUG-58727 Change-Id: I4be1e1c0b1388d0c9ec872e7732185670998b7af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>