summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * Cocoa: Update QWindow::screen() on expose/show.Morten Johan Sørvig2016-01-221-0/+12
| | | | | | | | | | | | | | | | | | This is needed to correctly handle show on non-primary screens. Change-Id: I80b13372b3a92786987a66f0da385af6b4a6a863 Task-number: QTBUG-47950 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-181-1/+5
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * 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>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-021-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * 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>
* | Remove dead code.Jake Petroules2015-11-271-1/+0
| | | | | | | | | | | | Change-Id: Idfaef408536bafbb31444ec8728dbcf289abac8d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-231-2/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure src/corelib/global/qglobal.h src/tools/qdoc/node.cpp src/tools/qdoc/qdocdatabase.cpp tests/auto/corelib/io/qsettings/tst_qsettings.cpp tools/configure/configureapp.cpp Change-Id: I66028ae5e441a06b73ee85ba72a03a3af3e8593f
| * 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.6' into devLiang Qi2015-10-141-9/+9
|\| | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
| * 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>
* | | Cocoa integration - re-parent NSView correctlyTimur Pocheptsov2015-09-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we add some view as a child into another view, make sure it's removed from the previous superview. Change-Id: I8c9f373907ded8e3ff75b1f2357401b308628125 Task-number: QTBUG-42059 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | | Cocoa integration - do not make a window key during modal sessionTimur Pocheptsov2015-09-261-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can happen that we create a new window and make it visible during a modal session. In this case making a window into the new key window looks quite strange and misleading - since we're in a modal session, this window is completely inactive/useless. Use orderFront instead. Change-Id: Ic091e263508b452be4b5adf799a06017b044e441 Task-number: QTBUG-46304 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Link to AppKit instead of Cocoa.Jake Petroules2015-09-051-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Cocoa is basically just AppKit + CoreData. Since we do not use CoreData in Qt, there is no reason to link to it or (transitively) import its headers. This is just a mechanical replacement of -framework Cocoa with -framework AppKit and <Cocoa/Cocoa.h> with <AppKit/AppKit.h> Change-Id: Ibcfc8a03c0ddff27a67fbc87dd7bd58a4b648956 Reviewed-by: Mika Lindqvist <postmaster@raasu.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>