summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
Commit message (Collapse)AuthorAgeFilesLines
* QCocoaWindow - resize embedded viewsTim Blechmann2015-12-151-1/+5
| | | | | | | | | | | | | when QCocoaWindow::setCocoaGeometry is called on windows embedded into a native cocoa gui, QPlatformWindow::setGeometry does not apply the geometry. we therefore need to set the frame on the embedded view manually. related tasks: Task-number: QTBUG-47632 Task-number: QTBUG-45269 Change-Id: I976e4606d36bb4afc74b0834105bceab8a6f8cbd Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-281-1/+1
| | | | | | | | | | | This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Cocoa integration - fix Qt::WindowFullscreenButtonHintTimur Pocheptsov2015-10-161-2/+5
| | | | | | | | | | | | | Window collection behavior changed from OS X <= 10.9 to 10.10 to 10.11: - the default behavior (0) included fullscreen button before 10.10, did not include in 10.10, and now it's again included. - it's not enough to exclude fullscreen - since the defualt is 0, 0 & ~fullscreen does not help - we also have to set fullscreen auxiliary. Task-number: QTBUG-48759 Change-Id: If427bd5cfa5c3cefc71f09dae7baa0d232601ee4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Cocoa: Support Qt::WindowTransparentForInputMorten Johan Sørvig2015-09-241-0/+3
| | | | | | | | | | | | | | | | Map this to ignoresMouseEvents on NSWindow. Task-number: QTBUG-45498 Change-Id: I86e518bbf805647d9f12b1af1747355ef55cc167 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * Cocoa integration - make tool window resizable againTimur Pocheptsov2015-09-211-5/+2
| | | | | | | | | | | | | | | | | | | | | | Tool window always had NSResizableWindowMask before dd02c1eb38c6dfc8367f2c692e11897b6c00b097, and this is broken, the new logic depends on WindowMaximizeButtonHint which is not set on, for example, un-docked widget. Bring the old behavior back, while not cancelling dd02c1e - make it resizable unconditionally, as it always was. Task-number: QTBUG-46882 Change-Id: Ib739a701d85aaadab83230deee808757de6b5e21 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Clean up cancel operation handling on OS XTor Arne Vestbø2015-09-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for handling cancel operations was spread out through the code base and sometimes hard-coded to only include the Escape key shortcut, missing the Command+. shortcut. We now intercept both attempts at cancel operations from the system through cancelOperation, which we forward as normal key events. A new QKeySequence::StandardKey has been added for the Cancel sequence, which maps to Escape on all platforms, and Command+. in addition for OS X. The hard-coded logic in QWidget and subclasses for dealing with closing the dialogs has been replaced with this key sequence, which allows clients to override the behavior. Note that the widget code is not wrapped in checks for QT_NO_SHORTCUT, as we don't care about keeping widgets building and working under that define. The logic in QCocoaWindow to bypass windowShouldClose when delivering IM events has been removed as we now handle that specific case by also forwarding Escape as a cancel operation. Task-number: QTBUG-47557 Task-number: QTBUG-45771 Task-number: QTBUG-44076 Change-Id: Ibe0b3a4819f8659d246a2142dd7d9cd3a826ef78 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | OS X adaptations to the high-DPI APIMorten Johan Sørvig2015-08-061-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | Use QPlatformWindow::windowGeometry() and friends instead of the QWindow API, which now returns (possibly scaled) values in device-independent pixels. Rename QCocoaWindow::windowGeometry() -> nativeWindowGeometry() Change-Id: I70279145079c3df793059d16fed9aafba2d49a6d Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | platforms: cocoa - fix QCocoaWindow::bottomLeftClippedByNSWindowOffsetTim Blechmann2015-08-061-5/+4
| | | | | | | | | | | | | | | | bottomLeftClippedByNSWindowOffset did not take multiple clippings into account. with this patch, we compute the offset via NSView-visibleRect. Change-Id: If4ec02eb983e30f7cc5a6a1cb73e8f5c28fe1551 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-011-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * Merge remote-tracking branch 'origin/5.5.0' into 5.5Liang Qi2015-06-271-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.h Manually fixed src/testlib/qtestcase.cpp to return the right type. Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4
| | * Cocoa: Remove ToolTip windows from popup stackMorten Johan Sørvig2015-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Match the cases for the adding logic. Change-Id: I61f49975b4cfcf2acf26b31b521cbc9b96f9d150 Task-number: QTBUG-46447 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* | | Add QCocoaWindowFunctions and add a function to find the clip offsetJorgen Lind2015-06-111-0/+19
| | | | | | | | | | | | | | | | | | Change-Id: I0f9cd1f923867f6f24b3bc54e442a16b5d2a11e4 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Fix crash in tst_qfiledialog on OS XSimon Hausmann2015-06-041-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test aggressively shows and hides dialogs and popups, and we would end up installing this global event monitor frequently. However we never cleaned up properly, for example if the window didn't get hidden properly or if the monitor was already installed for some reason. Change-Id: I6fa28eaeb03e089ced735912dbe29b0b8ad75d58 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-031-9/+34
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * | Cocoa: add QT_MAC_USE_NSWINDOW env. variableMorten Johan Sørvig2015-06-021-1/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | When enabled, all QWindows will be backed by a NSWindow. This is unlike the default where only top-level QWindows get a NSWindow. The QWindow still has (Q)NSView as the NSWindow content view. The return value of the winId functions are still the NSView and is not affected by this switch. Change-Id: I131b89af04c09451a6e7515d1da3f7498f53979a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| * Add support to disable close button from the tool window in Cocoa.Marko Kangas2015-05-271-3/+16
| | | | | | | | | | | | | | | | | | | | Fixed regression from Qt4 that close button could't be disabled from the tool window. With this patch buttons are hidden before using button hints like it's on Windows. Change-Id: I00f03ff9528ccae3b1136312404452b9415953b4 Task-number: QTBUG-45971 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Remove QNSView from superview in ~QCocoaWindow()Morten Johan Sørvig2015-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A QNSView without a corresponding live QCocoaWindow object is not in a valid state. Previously we would call removeFromSuperview for child QWindows to avoid having Cocoa send messages to the now invalid QNSView. Do this for QWindows embedded in native Cocoa hierarchies as well. Change-Id: I49c6daef8ed061b3f40138fe9b4ce6be190f2fd0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| * Cocoa: Upgrade default surface format to include an alpha channelUlf Hermann2015-05-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | The default surface format on OS X is changed to RGBA since this is most performant. You can request a different surface format to change this. You can not request the default format without alpha channel, though. Change-Id: I4f44d0abe01515c98ba699c76a0dd5e37b873766 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * cocoa: Do not access the integration instance when shutting downLaszlo Agocs2015-05-121-1/+3
| | | | | | | | | | | | Task-number: QTBUG-46016 Change-Id: Icb7f0c73d5fe944538e2b9abf50c2532037e932f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.4' into merge5.5Allan Sandfeld Jensen2015-05-081-2/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/io/qnoncontiguousbytedevice_p.h src/gui/image/qjpeghandler.cpp src/network/access/qhttpthreaddelegate_p.h tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp tests/auto/widgets/widgets/qmenubar/BLACKLIST Change-Id: I01de8c1c28efcedfd7953d05025f54802dc08ab3
| | * Cocoa: Handle the event passed into the global monitor correctlyAndy Shaw2015-04-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the global monitor was used it did not get the right position for the mouse event and as a result it caused context menus to appear and disappear instantly when right clicking over a non active window. This ensures that the events are sent correctly with the right position and button information. Task-number: QTBUG-45015 Change-Id: I9b17a725e656c716c4e22117b4513e64c357b266 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Add shared implementation of a NSAutoreleasePool wrapper to qglobalTor Arne Vestbø2015-05-271-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have at least 5 different (but equal) implementations of a wrapper in Qt, and some code uses explicit NSAutoreleasePools. Having a shared implementation lets us clean up things a bit and makes it easier to reason about which pools are actually needed. Change-Id: I2fd8eefc3ae7308595ef9899b7820206268362a5 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-221-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/gui/painting/qdrawhelper.cpp src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/testlib/qtestblacklist.cpp src/tools/qdoc/node.cpp src/tools/qdoc/node.h tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
| * | Cocoa integration - invalid window stateTimur Pocheptsov2015-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | QCocoaWindow::syncWindowState incorrectly sets m_effectivelyMaximized as !m_effectivelyMaximized after calling zoom. But zoom can trigger windowDidEndLiveResize, which also can set m_effectivelyMaximized, so double negation results in ... the previous value. Fixed. Change-Id: Iea974132a1854a258e27635e8779d7d8c02bfc0c Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-061-30/+12
|\| | | | | | | | | | | Change-Id: If9fd98525b6b4ca07e5e006fc98bf372a73b8a21
| * | Cocoa: Fix minimizing/zooming frameless windows.Christoph Schleifenbaum2015-04-011-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use miniaturize instead of performMiniaturize when the window has no minimize button (even if frameless). Make sure the window is resizable before performing zoom. Even restore this, of course. Change-Id: I43217153b4d4fcec0ded4afcde3009817e01feba Task-number: QTBUG-32184 QTBUG-45339 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
| * | Revert "Cocoa plugin - showMaximized/showMinimized and Qt::FramelessWindowHint"Timur Pocheptsov2015-04-011-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d024f0a9228a33787f2e9b0ecb2573041fa048df. Qt::FramelessWindowHint actually DO require 'non-resizable' window. Let's assume, non-resizable means 'resize by mouse dragging'. There is a better fix that will follow this patch (temporary setting/resetting resizable mask). Change-Id: I61cefcade437d3e54719e2e1ff0e8d070c577df0 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-28/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| | * Revert "OS X: main window doesn't become key."Timur Pocheptsov2015-03-091-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit da0c74550f0e8a21239896d6aead6e05f85eb695. The patch da0c74 unfortunately does not work well with QCocoaMenuBar's logic: it can happen that our selectNextKeyWindow chooses a Popup or another window with some 'unusual' flag as a key, but QCocoaMenuBar::updateMenuBarImmediately will return immediately, assuming that popup does not have a menu and there are no menu items to enable. Task-number: QTBUG-44369 Change-Id: I83cd2f6a62acd3a6ceb4d9dbf53ca42af67476d8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-03-241-3/+10
|\| | | | | | | | | | | Change-Id: If5d2e621c2fa5476c3ab687a3f4620c54fc3b32e
| * | Cocoa: Don't let key events triggering input method events close dialog.Christoph Schleifenbaum2015-03-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a flag to QCocoaWindow to ignore shouldCloseWindow. This is set from within QNSView when escape is pressed and the current focus widgets is processing input method events (like QTextEdit). This lead to unwanted dialog rejects. Task-number: QTBUG-44076 Change-Id: Ic90a8a6ba8c5cddbc0d486563acad57dd384d179 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * | QCocoaWindow.mm: Avoid crash whe using native windowsFilipe Azevedo2015-03-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | When using native windows, notification were received after the platform window pointer was cleaned up, which caused crashes. Change-Id: I438fc29d1761a32a4705c4c802afe46908505756 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-03-161-10/+16
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbnativeinterface.h Change-Id: I31b38ba439b9341d51a01c0fd54bea33f7410076
| * | Cocoa: Correct mouse event forwarding for popupsMorten Johan Sørvig2015-03-121-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to track the active popup globally, having parent windows track child popups is not sufficient since there may be one or more intermediate windows in between the event receiving window and popup window. Add API to QOCocoaIntegration for tracking the global popup window and use it instead of the per-window tracking. Make sure to only close popups on clicks outside the popup only. Add code to QNSView::handleMouseEvent that redirects mouse events to the active popup. Add manual test. Change-Id: Ia3e3fd42d8fddf5c69f0c6879b333ca544521f61 Task-number: QTBUG-43464 Task-number: QTBUG-31937 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | | QCocoaWindow - fix a flag testTimur Pocheptsov2015-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | NSBorderlessWindowMask is just 0, not the 0-th bit, so testing styleMask & NSBorderlessWindowMask never works, use original flags instead. Change-Id: I47da7b5b7795fce88dec88c948a68197fa428991 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Cocoa integration - do not report invalid coordinatesTimur Pocheptsov2015-03-061-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | setStyleMask with NSBorderlessWindow will call (indirectly) windowDidResize (window.delegate's method) and view's updateGeometry. At this point view.window can be nil (Cocoa is re-parenting the content view (?). If this is the case, do not set this updated geometry on a QWindow/platform window (since window is nil, self.window.frame is returned as {{0, 0} {0, 0}} by Cocoa). Found by tst_QWidget::setGeometry. Change-Id: Ic3cc0d944b5a8a5095c7fd0fdf2df7c9ea602b2a Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | | | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Fix crash-on-exit when embedding QNViewMorten Johan Sørvig2015-02-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | The QWindow and QCocoaWindow may be deleted before the QNSView (which Cocoa keeps a reference to). Clear pointers to the Qt windows on QCocoaWindow destruction and add null-pointer check to QNView::isOpaque. Change-Id: I71764886c27bf1d14fb4e684c15e7c72e1c0a17c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-111-22/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | Cocoa plugin - showMaximized/showMinimized and Qt::FramelessWindowHintTimur Pocheptsov2015-02-041-2/+5
|/ | | | | | | | | | | | | | 1. Qt::FramelessWindowHint imlplies NSBorderlessWindowMask, but should _not_ exclude NSResizableWindowMask - we still have API (showMaximized) to resize this window. Without NSResizableWindowMask showMaximized (calling NSWindow's '-zoom' under the hood) has no effect. 2. -performMiniaturize does not work with a borderless window, since such a window does not have a minimize button - use miniaturize for such window instead. Change-Id: I691182ad7c1d230e670bfb70ef758483acbf0792 Task-number: QTBUG-44195 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Cocoa: Guard against recursive event deliveryMorten Johan Sørvig2014-11-051-0/+3
| | | | | | | | | | | | Fix "Recursive repaint" crash. Add guard to QCococaWindow::setGeometry and QNSView updateGeometry to prevent processing window system events during setGeometry. Task-number: QTBUG-41449 Change-Id: I304fdf134d433cbc50fafd997ecd91e31cb57f4e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Cocoa: refactor commit 876a428f.Morten Johan Sørvig2014-11-051-0/+5
| | | | | | | | | | | | | | Conditions for when updateExposedGeometry() should actually send the expose event goes into the function itself. The window()->isVisible() check could arguably be moved to isWindowExposable(), but I'm keeping this as a straight refactor without any behavior changes. (isWindowExposable() is called from multiple locations) Change-Id: I6d792286ccbc50065ebfc588daca2240761a1937 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Cocoa: Handle Qt::WA_MacAlwaysShowToolWindowShawn Rutledge2014-10-291-1/+5
| | | | | | | | | | | Forward the flag to QWindow by setting the _q_macAlwaysShowToolWindowproperty on the window in QWidgetPrivate::create_sys(). Test for the property when creating the window. Task-number: QTBUG-29816 Done-with: Morten Sørvig Change-Id: Id810dda98d02deb0902192cce1783d8b16b04d04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa QPA Plugin: Remove code depending depending on OS X 10.6 and olderGabriel de Dietrich2014-10-271-92/+34
| | | | | | | Snow Leopard is unsupported from 5.4.0. Change-Id: I5c269cbdc93000a4657b63559cc3c526e298e3db Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Cocoa: Expose on window size change onlyMorten Johan Sørvig2014-10-271-1/+1
| | | | | | | | Don't send expose events on window move. Task-number: QTBUG-42126 Change-Id: I6e758f9037a2a785c651b63d25b53e7a009b1fdf Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Cocoa: Bring back qt_mac_set_raise_processMorten Johan Sørvig2014-10-241-3/+6
| | | | | | | | | In the form of an environment variable: QT_MAC_SET_RAISE_PROCESS. The default value is "on". Task-number: QTBUG-41569 Change-Id: Icf2e8818a6b126c7393ee022a1cab493fbc3a18e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Don't flush user input events from setVisibleMorten Johan Sørvig2014-10-241-1/+1
| | | | | | | | | | | | | | Applications do not expect user input event delivery during QCocoaWindow::setVisible. The call to flushWindowSystemEvents still needs to be here for proper expose event processing, but we can at least exclude user input events. Task-number: QTBUG-39842 Change-Id: Ibd511efef47eeda21831481ef096a82d7b5a9cf8 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Correct devicePixelRatio for software OpenGLMorten Johan Sørvig2014-10-071-6/+7
| | | | | | | | | | | | | | | [NSView setWantsBestResulutionOpenGLSurface] is a hint and the driver may ignore it, for example when using software OpenGL on a virtual machine. In these cases devicePixelRatio() must return a value corresponding to the actual OpenGL surface size. Use [NSView convertSizeToBacking] which is one of the recommended methods. Task-number: QTBUG-41767 Change-Id: Ia79242219908a2454a83b44b6eb7463372764162 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-291-0/+33
|\ | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191