summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* xcb: qxcbdrag.cpp cleanupsGatis Paeglis2018-06-224-154/+118
| | | | | | | | | | | | | | | | | | | | | | | | | - moved finding of XdndAware target logic in its own function to reduce size of QXcbDrag::move(). - switched to use categorized logging with more consistent logging messages - added more comments to avoid constatly looking at the specification for the meanings of Xdnd* actions and who sends/receives the action. - removed dead code (findXdndAwareParent), which should have been removed in 269fdbdd2bedda5f5eacb751224d3a3fc3eed5bc when reimplementing this logic in XCB. - removed needless reseting of state variables in various places as this is handled in QXcbDrag::init() on DnD start. - renamed variable in QXcbDrag::dndEnable(): xdnd_widget -> window - and other minor cleanups Change-Id: Ib667f80ceb4c07b7409a90c041044c98665877f3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-0731-78/+112
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * Fix QWindowsWindow::requestActivateWindow()Sergiy Korobov2018-06-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsWindow::requestActivateWindow() does not work correct if QWindowsWindowFunctions::AlwaysActivateWindow is passed as a parameter to QWindowsWindowFunctions::setWindowActivationBehavior(). When the calling process is not the active process, only the taskbar entry is flashed. It is not correct. The window should be always activated, even when the calling process is not the active process. Task-number: QTBUG-37435 Task-number: QTBUG-14062 Change-Id: I7a321d7bac744a7776278210b1b5a2fd4288aa43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix QWindowsNativeInterface::platformFunction()Sergiy Korobov2018-06-011-0/+2
| | | | | | | | | | | | | | | | | | | | QWindowsWindowFunctions::setWindowActivationBehavior() does not work because QWindowsNativeInterface::platformFunction() is broken. Task-number: QTBUG-37435 Task-number: QTBUG-14062 Change-Id: Id5688316654ea8ad47d5c68894c376cb83e3583a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
| * iOS: Handle application state for application extensionsTor Arne Vestbø2018-05-301-6/+21
| | | | | | | | | | Change-Id: I97df0f8ecf93e28bfbe9c719922f1ee5ec12b563 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-2927-64/+62
| | | | | | | | | | | | | | | | | | 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>
| * iOS: Send window-system event also when embedded in native iOS appTor Arne Vestbø2018-05-293-32/+50
| | | | | | | | | | | | | | | | | | | | | | The iOS event dispatcher has been split into two; one dealing with the QPA event processing, which we should always do, and one dealing with the longjumping that we do when running the user's main on a separate stack. Change-Id: I1f819db33c608aad130ff23cbbadcf84363a32d2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 5414d372d42278b146ce1cdf1096c4e91e7039ad)
| * iOS: Don't assume our UIWindow is a QUIWindowTor Arne Vestbø2018-05-291-1/+2
| | | | | | | | | | | | Change-Id: I6494e4a476273b131aedcf409abdb1ffffa5b62e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit ab9b026d2734321f1d5a06b79f97107a867687c3)
* | Add support for _q_platform_qnxWindowType QWindow propertyJames McDonnell2018-06-051-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This dynamic property can be used to specify an explicit QNX window type for a QNX platform window. The _q_platform_ prefix makes it possible to place the property on QWidget objects instead. Existing functionality ensures that any QWidget property whose name begins with _q_platform_ is copied to the underlying QWindow object prior to creation of the platform window. Add _q_platform_ aliases for the dynamic qnxInitialWindowGroup and qnxWindowId properties so that these properties can be also be specified on QWidget objects. Change-Id: Ia37a965dd25de333307b2bb5ae81446db271af1f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Dan Cape <dcape@qnx.com>
* | macOS: Make sure QNSPanel also gets a debug descriptionTor Arne Vestbø2018-06-051-0/+1
| | | | | | | | | | Change-Id: I5de08c3493b02a8e98ba3c4fe3922f5f9fd6e2c2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Deliver screen changes synchronouslyTor Arne Vestbø2018-06-051-2/+2
| | | | | | | | | | Change-Id: Iea8fcb69b6c05c4f81fedb4ec423aed89d9d2d3c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Make layer-backed mode the defaultTor Arne Vestbø2018-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindows are still backed by NSViews, but these views render to a CoreAnimation layer instead of directly to the top level NSWindow. This is the direction Apple is going (and is the only available option on iOS/tvOS), so we want to move away from the existing code path as soon as possible. The default can be reversed by setting QT_MAC_WANTS_LAYER=0, or the _q_mac_wantsLayer property on QWindow. [ChangeLog][macOS] Layer-backed mode is now the default for QWindow. Change-Id: Ibb9cc7541b179cad215d0daee14aeb1b54be614c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: minor refactoring in mouse handlers for nsview/systemtrayiconMikhail Svetkin2018-05-313-23/+33
| | | | | | | | | | | | | | Use new helper functions for mouse events Change-Id: I01e83a228deb16cbdb1d7c8c628a92d48055ee2b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Windows QPA: Fix release button event type after moving windowsFriedemann Kleint2018-05-311-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check whether the mouse is inside the window and report MouseButtonRelease or QEvent::NonClientAreaMouseButtonRelease, respectively. The inside case is triggered by programmatically starting a size move via QPlatformWindow::startSystemResize() (QSizeGrip) and was overlooked in 7c3ecf85a770cd7fef01ece935f88d8894de09b2. Complements 45894408913f62f6f25a302d8ed07af57ac7db5d, 7c3ecf85a770cd7fef01ece935f88d8894de09b2. Change-Id: I8f714dc768a163878c2b4a075470bcee2dfbd802 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* | Fix missing override warning for androidLiang Qi2018-05-301-1/+1
| | | | | | | | | | | | | | This amends 8447f5f0062. Change-Id: Idd25c13735539682f6034724df4c79fcf10a1810 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | macOS: Minor metal support nits/cleanupsTor Arne Vestbø2018-05-301-3/+2
| | | | | | | | | | | | Change-Id: I840426ebf35b0fec64e92386fc3e1cabd91ced25 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | winrt: Handle expose event before removing windowOliver Wolff2018-05-251-1/+2
| | | | | | | | | | | | | | | | | | | | QWindow should get an expose event before being hidden. handleExpose iterates over the list of visible windows, so it has to be called before the window is removed from the list of visible windows. Change-Id: Ide920ade43c057b9aafdf9fdfa2d54d3336289d8 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-243-5/+21
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * Windows Platform: Redirect wheel event to a window under mouse cursorAlexandra Cherdantseva2018-05-161-3/+17
| | | | | | | | | | | | | | | | | | | | | | Revert a part of af5c8d04fb0c9ddda58925e4862e857c78a5e563 which affected mouse wheel event redirection. Task-number: QTBUG-63979 Change-Id: Ice88675aadbb8a7477b3758a607db5979d62562c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandra Cherdantseva <neluhus.vagus@gmail.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Windows QPA: Fix wrong initial size when launched on secondary screenFriedemann Kleint2018-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | Send changed events from QPlatformWindow::initialize() synchronously so a protentially changed screen takes effect in QWindow::resize() called by QWidget::show_sys(). Task-number: QTBUG-67777 Change-Id: I889500d458caf0e782bdbc237ce790f0b0bc2d95 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Fix build without features.cursorTasuku Suzuki2018-05-151-0/+2
| | | | | | | | | | Change-Id: I450bd9f160c64f718c49e87d274c1ccc4a657aca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | VNC plugin: explicitly cast int to uint16_t before calling htonsShawn Rutledge2018-05-231-3/+3
| | | | | | | | | | | | | | | | | | Otherwise there is a -Werror=narrowing error on big-endian architectures (where htons does nothing). Task-number: QTBUG-68390 Change-Id: Idb204a81aaedb9f4fde1d5fae406da36c7a1953e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Cocoa Menus: Add support for menu items in window-less appsGabriel de Dietrich2018-05-234-30/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we moved the menu items validation and target/action to QNSView (thus relying on the responder chain), we need to take care of case when the applications that doesn't have any window open. By adding similar methods to QCocoaApplicationDelegate, the last responder, we ensure the menu items will be validated and will trigger properly. This is particularly necessary for dock menu items, which live separately from any top-level widget. Dock menu added to Menurama which won't quit when its last window is closed. This way we can test that dock menu items will trigger in the absence of any window. Change-Id: I56d864eb9da1f8dd5adb2a3b6c3dd5304c723117 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Windows QPA: Fix Qt include statementsFriedemann Kleint2018-05-2385-315/+296
| | | | | | | | | | | | | | | | | | | | | | | | Change #include <QtCore/QDebug> to #include <QtCore/qdebug.h> according to the coding style. Change-Id: I6ba8a7424c548ddde1d18f3f6f4f87e30973d710 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Direct2D QPA: Fix Qt include statementsFriedemann Kleint2018-05-2315-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | Change #include <QtCore/QDebug> to #include <QtCore/qdebug.h> according to the coding style. Change-Id: I34ddf9b9101cfbd5054584608de09de5b4b2f233 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Windows: Fix MinGW compilation after ec97be5585Martin Storsjö2018-05-221-0/+1
| | | | | | | | | | | | | | | | | | This fixes compilation that failed due to QOperatingSystemVersion being undeclared. Not sure from where it was transitively included in other builds where it apparently have worked fine though. Change-Id: I32cfb51c4787604d456fffa7a3a8ed09952a0513 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows: Add support for invisible window marginsAndre de la Rocha2018-05-184-21/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows 10 windows contain an invisible area within the NC window frame on which the mouse cursor is enabled to perform resizing. This change captures the geometry of the invisible margins and considers it when moving a window, so that, for instance, a move(0,0) does not generate gap between the window and the beginning of screen. [ChangeLog][Windows] The dimensions of invisible margins inside the frames of Windows 10 windows will now be disregarded in the positioning of Qt windows to avoid a misplaced look (offset by a few pixels from the expected position). Task-number: QTBUG-55762 Change-Id: I1f537756eb1a093f78b919de9d44992528199700 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Fix left button reported pressed after moving windowsFriedemann Kleint2018-05-163-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | When moving a window by dragging the title bar, no WM_NCLBUTTONUP is received after WM_NCLBUTTONDOWN, WM_NCMOUSEMOVE (due to internal mouse capture), which can leave the left mouse button 'pressed' in QGuiApplication's state. Intercept WM_EXITSIZEMOVE to sync the buttons. Complements 45894408913f62f6f25a302d8ed07af57ac7db5d. Change-Id: I94d18d1d4a4796dcecb1a9731809d05c7f9ddd65 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | macOS: minor refactoring in handler of global monitorMikhail Svetkin2018-05-151-5/+6
| | | | | | | | | | | | | | Use new helper functions for mouse events and buttons Change-Id: Idb74fbd4ffde0c22b3d4bbddb5761567081bdf7c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-141-15/+25
|\| | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_module_headers.prf tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qwidget/BLACKLIST Change-Id: I2a08952d28d1d0e3d73f521a3d44700ce79ff16c
| * Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-091-15/+25
| |\ | | | | | | | | | Change-Id: Id6e2acd5e31c1ac858ddf1d8873a6f10694141de
| | * Merge 5.11 into 5.11.0Oswald Buddenhagen2018-04-209-36/+60
| | |\ | | | | | | | | | | | | Change-Id: I11c61dc1259ed66d871ecab2666085ccf37a9342
| | * | Also support reset notification on non-nvidiaAllan Sandfeld Jensen2018-04-191-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 5.11 robustness was added for nvidia drivers, this patch extends that to other opengl drivers, and fixes the reported format. Change-Id: Ia81934c3bcf13e7300fb4e75674ea63317039870 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | Vulkan: share library loading implementationMorten Johan Sørvig2018-05-146-36/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macOS, Windows, and XCB implementations are identical and can be moved to QBasicPlatformVulkanInstance. Change-Id: Id84b27ffd87f86afe3798c4ad2743ba05e6190d3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Vulkan: Share destroySurface() implementationMorten Johan Sørvig2018-05-146-52/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macOS, Windows, and XCB implementations are identical and can be moved to QBasicPlatformVulkanInstance. Change-Id: I1380b2bd03080710084a1458bdce3a362ba5c287 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | macOS: Add QSurfaceType::MetalSurfaceMorten Johan Sørvig2018-05-112-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add API to activate previously added Metal layer implementation. This provides minimal support, and unlike VulkanSurface there is no separate QWindow subclass. What this does do is configure the QWindow to use a Metal layer, and to send expose/update events when the layer content should be redrawn. Qt will also update the layer’s drawableSize and contentsScale when needed. Application code can make use of this by accessing the QWindow layer, which will be a CAMetalLayer: CAMetalLayer *metalLayer = reinterpret_cast<CAMetalLayer *>( reinterpret_cast<NSView *>(window->winId()).layer); Change-Id: I514f5186133c3e610fd4e53ca91fe9c85c6d016e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-082-0/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro Change-Id: I3169f709cc2a1b75007cb23c02c4c79b74feeb04
| * | | Fix building with -no-feature-shortcutJoni Poikelin2018-05-082-0/+10
| | | | | | | | | | | | | | | | | | | | Change-Id: I7576055a6d81d6a7a075ebff16ca6b0ced4e984e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | macOS: Transition to new QPA dag-and-drop APIMikhail Svetkin2018-05-084-25/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new API allows us to pass the mouse buttons and keyboard modifiers along with the QWSI event. Task-number: QTBUG-57168 Change-Id: Ic54c012d1593d922e7dcd31facab2f2c630c7996 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | macOS: Experimental Vulkan support via MoltenVKMorten Johan Sørvig2018-05-089-7/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for QSurface::VulkanSurface and QVulkanWindow. Usage: 1) Build MoltenVK according to instructions 2) Configure Qt: ./configure -I /path/to/MoltenVK/Package/Release/MoltenVK/include 3) export QT_VULKAN_LIB=/path/to/MoltenVK/Package/Release/MoltenVK/macOS/libMoltenVK. Implement support for QSurface::VulkanSurface by enabling layer mode for QNSView and then creating a CAMetalLayer, which the MoltenVK translation layer can run on. MoltenVK provides an implementation of the Vulcan API, which means that the platform integration is similar to other platforms: implement a QCocoaVulkanInstance where we pass the QNSView instance to the vkCreateMacOSSurfaceMVK Vulkan surface constructor function. Using Vulkan directly without QVulkanWindow is possible, but not tested. We currently load libMoltenVK at run-time and use the existing QT_VULKAN_LIB environment variable to set its path. For deployment purposes it would be better to link against MoltenVK.frameworkm, but this Task-number: QTBUG-66966 Change-Id: I04ec6289c40b199dca9fed32902b5d2ad4e9c030 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | Windows QPA: Improve debug output of keyboard shortcut handlingFriedemann Kleint2018-05-081-16/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a debug operator for KeyboardLayoutItem and output keys in QWindowsKeyMapper::possibleKeys(). Change-Id: I28215f44da2a9c08a27541ef0e906d37be2bad72 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | | Move default implementation of update requests to QPlatformWindowTor Arne Vestbø2018-05-074-5/+7
| | | | | | | | | | | | | | | | | | | | Change-Id: I4cbb8d2023068288e298ab21f5cd8bc258825c77 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Windows QPA: Use new QPA Dnd APIFriedemann Kleint2018-05-051-29/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-57168 Task-number: QTBUG-56244 Change-Id: I84cf811d9e886369a659ecb33ce1778207660922 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-052-198/+122
|\| | | | | | | | | | | | | | | Change-Id: Ib58433da04bffb5dfab5486b80f17f39cc4145fa
| * | | Generate more Windows/Linux-like Qt keyboard eventsJames McDonnell2018-05-042-198/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QKeyEvent::key values were significantly different on QNX and some QKeyEvent::text values were also different/missing. Also makes it possible to enter numbers via the numeric keypad. Change-Id: Ifcf6284b99a893a87974d37ec6d6976f88241e61 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Dan Cape <dcape@qnx.com>
* | | | QNX: Add screen-context-capabilities platform parameterJames McDonnell2018-05-041-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifies the flags value for the screen_context_create call allowing the Qt application to take on additional screen capabilities via the Qt screen context. Change-Id: Ic7aa478227e64afe2d1d7d04ec58c11ad68b9f22 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | | QNX: Move screen event retrieval to the GUI threadJames McDonnell2018-05-045-115/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of retrieving screen events itself, the screen event thread now turns screen event notification into a Qt signal. In response to the signal, the GUI thread processes screen events. Eliminates the need to coordinate access to a screen event queue. Also prepares the way for getting rid of the screen event thread. This could be done if the QNX event dispatcher were switched from poll to MsgReceive (dispatch). Change-Id: If5892466d04d67f00828fddaea38b20da5fb18a3 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | | qpa: improve API to support DnDs from other processesGatis Paeglis2018-05-046-22/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... instead of using a hack of directly accessing QGuiApplication members. The current QPA API was bad for two reasons: 1) It expects platform plugin authors to know about internals of Qt Gui, particularly that QGuiApplication uses QGuiApplication::{mouseButtons,keyboardModifiers} to construct QDragMoveEvent and QDropEvent events. Which results in the second reason why this is bad. 2) Platform plugins should not directly access member variables of QGuiApplication, just to make sure that QDragMoveEvent and QDropEvent events contain correct state. Platform plugins should instead use QWindowSystemInterface to communicate with Qt Gui (which is also the solution here). The solution is to extend QWindowSystemInterface::handle{Drag,Drop} to require mouse/keyboard state. We already do this for some of the other methods, so it is nothing extraordinary. This type of interface is also _required_ to support drag-n-drops from other processes. We can't use QGuiApplication::{mouseButtons,keyboardModifiers} when the drag originates from another process, instead we need to query mouse/keyboard state from the system. This patch fixes drag-n-drops from others processes on XCB platform plugin. Task-number: QTBUG-57168 Change-Id: I3f8b0d2f76e9a32ae157622fef801829d629921d Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>