summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* xcb: fix various bugs with _NET_WM_MOVERESIZEGatis Paeglis2018-07-235-9/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) After a37785ec7638e7485112b87dd7e767881fecc114 it become apparent that we don't get mouse release event from X server when system move/resize ends (because WM is grabbing the pointer). The old code (before a37785ec) would wrongly deduce mouse move as mouse release, which is why the issue was not seen before. The solution is to subscribe to slave device events. 2) This patch also amends 2488f34ecfd68702b5508c50cca3fb8e967ac8ea as that patch was solving the issue only for 1/3 of the supported DEs. It worked with KWin, but not with Unity and Gnome. Its worth noting that it also worked with two other WMs that I tested - openbox and awesomewm. The way forward is to detect when system move/resize was started as a result of touch event and let the QSizeGrip do the move/resize instead of WMs that are known to have bugs. With this patch we also need to adjust the event compression algorithm to not treat all XI_TouchUpdate events equally. For XI_Motion we don't care if the event that we process comes from a master or a slave device, so we can process them as equal. Task-number: QTBUG-68501 Task-number: QTBUG-51385 Task-number: QTBUG-32476 Change-Id: Iab4e79a289d7bc0fe26f7ae2cff7c562f51a3334 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* XCB/Xlib: make sure we don't get problems for sys headers using registerThiago Macieira2018-07-117-0/+14
| | | | | | | | | Found while compiling on FreeBSD 11.2 (clang 6 update has the warning): /usr/local/include/X11/Xlibint.h:675:7: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] Change-Id: I117816bf0f5e469b8d34fffd153e6482ccaed69f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* winrt: Avoid superfluous touch events for multitouchOliver Wolff2018-07-111-1/+4
| | | | | | | | | | | | | A touch press event's state has to be set to "stationary" after the touch event (including its list of touch points) has been passed to the QWindowSystemInterface. Following touch events (that are caused by another id) will not change the press event's state which can otherwise cause more than one press event for a given id in a multitouch setup. Task-number: QTBUG-58793 Change-Id: I44628912251beacfbda7dd37059577cb1d085bd5 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* xcb: Monitor XSETTINGS changeAlexander Volkov2018-07-101-0/+1
| | | | | | | | | | | | | Register QXcbXSettings object as a listener of events received by XSETTINGS window. It was forgotten to be done in 0f31a5d91f13bd6a574bed8db894a7ebb2813292 which introduced QXcbXSettings. XSettings are used by QXcbCursor to get cursor theme. Without this change QXcbCursor can't react on theme change. Change-Id: I0fdd4c913b1d7a482b507c5a054b7052cac61666 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* xcb: Move handling of RRScreenChangeNotify from QXcbScreen to QXcbVirtualDesktopAlexander Volkov2018-07-093-100/+103
| | | | | | | | | | | | | | | This event relates to xcb_screen_t (virtual desktop), not to RandR crtcs, so move its processing to QXcbVirtualDesktop. Currently it triggers redundant calling of RRGetCrtcInfo (from QXcbScreen::updateGeometry()). It's called anyway after receiving RRCrtcChangeNotify, so just drop it. There is also a mess between the rotation of Screen and crtcs, obviously they should be processed separately. Task-number: QTBUG-65598 Change-Id: I124752ccbde03adb15e9ba592dd8b2d8d7fc35f4 Reviewed-by: Daniel Vrátil <dvratil@kde.org> Reviewed-by: Gatis Paeglis <gatis.paeglis@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>
* Add missing override keyword found by ClangThiago Macieira2018-07-051-1/+1
| | | | | | | qbsdfbscreen.h:57:10: error: 'initialize' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] Change-Id: I117816bf0f5e469b8d34fffd153e649318d2fd7c Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* QNX: Add the ability to disable EGL_KHR_surfaceless_context useJames McDonnell2018-07-013-2/+18
| | | | | | | | | | | QML fails to draw when this is used on at least one jacinto6 platform. Works when it's disabled. Task-number: QTBUG-68227 Change-Id: I7b3c081d4d5a4fe22136f4bdd8ad1f34495cd94a Reviewed-by: Adam Treat <adam.treat@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Fix automatic showing/hiding of the Windows 10 on-screen keyboardAndre de la Rocha2018-06-283-38/+74
| | | | | | | | | | | | The automatic showing/hiding of the built-in on-screen keyboard in touchscreen-based Windows computers, like the Microsoft Surface line, has stopped working after recent Windows updates. The OSK no longer seems to rely on UI Automation properties to detect text widgets. However, it can be triggered by showing an invisible caret. Task-number: QTBUG-68808 Change-Id: Ia604d21e314965dcdc61f1ced050cc3ed771f567 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* Windows QPA/GL: Fix build with MinGW/g++ 8.1 x64Friedemann Kleint2018-06-263-25/+49
| | | | | | | | | | | | | | | Fix warnings about invalid function type casts (return types conflicting with the PROC returned by wglGetProcAddress()) like: qwindowsglcontext.cpp:1250:138: error: cast between incompatible function types from 'PROC' {aka 'long long int (*)()'} to 'GLenum (*)()' {aka 'unsigned int (*)()'} [-Werror=cast-function-type] m_getGraphicsResetStatus = (GLenum (APIENTRY *)()) QOpenGLStaticContext::opengl32.wglGetProcAddress("glGetGraphicsResetStatusARB"); by introducing nested casts. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I7c51836f2b9f7e2a6fa17c5108d59b23c42fb99d Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Do not update scroll coordinates on ignorable enter eventsAllan Sandfeld Jensen2018-06-221-4/+4
| | | | | | | | | | | | | | | This greatly reduces how often we reset the scroll evaluators, especially with non-focused windows in KWin which sends an enter for every wheel events in that case. The update of the evaluators also has race conditions with the normal events, and thus reducing them fixes odd scrolling behavior with rapid firing mouse wheels. Task-number: QTBUG-42415 Task-number: QTBUG-68734 Change-Id: I1c14ca3352bf9c6e57e47ad3aaee1712fe6ba30b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Recognize X11/XCB keysyms Undo, Redo, Find, CancelJonathan Marten2018-06-221-0/+7
| | | | | | | | | Convert these keysyms into the corresponding Qt::Key_ enum values, so that they can be part of a QKeySequence and used by applications. Task-number: QTBUG-69062 Change-Id: I6f2e28191dd8dacd63d4bf710e1714fc5dcce75f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* xcb: add qt.qpa.input.events logging of wheel eventsShawn Rutledge2018-06-211-0/+2
| | | | | | | | | | This is comparable to what we do on macOS, except that the scroll phase and inverted state are missing. Task-number: QTBUG-38570 Task-number: QTBUG-56075 Change-Id: I27502e1e2667317ab701f30f1fc601ae1e0591d0 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Windows QPA: Fix crashes when processing native eventsFriedemann Kleint2018-06-211-1/+1
| | | | | | | | | | | Change a0a22037cdacbf51a2db560ff902a5a341561b15 wrongly introduced a level of indirection when passing the MSG * as void * to QWindowSystemInterface::handleNativeEvent() in QWindowsContext::filterNativeEvent(). Remove the indirection. Task-number: QTBUG-67095 Change-Id: Ibc2db7ae56bca38f79bafabfabb6127d6ff8cf09 Reviewed-by: Oliver Wolff <oliver.wolff@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>
* Merge remote-tracking branch 'origin/5.11.1' into 5.11Qt Forward Merge Bot2018-06-1917-103/+207
|\ | | | | | | Change-Id: I9a4571ccf826a86e055dfbba23b5e5cbd8ea55e8
| * xcb: add QT_XCB_NO_MITSHM envvar for disabling MIT-SHM extensionGatis Paeglis2018-06-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | We had something like this already in Qt4: QT_X11_NO_MITSHM The logic from 67227aeffdf94be8d177309d27291d5b3247586c not always works. There can still be cases that xcb_shm_attach_checked() returns with no errors on remote clients. Task-number: QTBUG-68783 Change-Id: Idd27ac66eb8f1114e3d1e1ddaaab2b00f235c561 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * xcb: fix regression with remote X11 clientsGatis Paeglis2018-06-113-53/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several issues here: We were attempting to use MIT-SHM functions over SSH connection, which is not supported. X server should detect this and return with an appropriate error message. It does actually return BadAccess for non-fd code path, but Qt was stubbornly trying to repeat this action and always falling back to malloc (during window resizing). For fd code path we were hitting X server bug, which would result in window freeze [1]. During the initialization we check if xcb_shm_attach_checked() fails, and disable MIT-SHM if it does. We use this logic to detect if we are running remotely, as there are no public APIs for it. This way we can avoid X server bug and avoid needless calling of code path which will _always_ fail on a remote X11 connection. [1] https://lists.x.org/archives/xorg-devel/2018-June/057011.html Task-number: QTBUG-68449 Task-number: QTBUG-68783 Change-Id: I7ab3dcf0f323fd53001b9f7b88c2cb10809af509 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * Revert "xcb: round down the scale factor for values < 0.8"Mitch Curtis2018-06-091-6/+1
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 23b139038a1dc9a769a358ab112453abcdd39290. The commit causes a regression on Ubuntu where the DPI setting of the display is ignored. Task-number: QTBUG-68620 Change-Id: Id176f8cda0daef1755abb3aa9382476cc4ed7d71 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * xcb: fix mouse event compression with certain configurationsGatis Paeglis2018-06-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug was that we are accessing memory beyond 32 bytes. It is not safe to cast xcb_generic_event_t to Xlib's XI2 structs before we have memmoved bits to the expected layout (for details see QXcbConnection::xi2PrepareXIGenericDeviceEvent). We do this memmove later in the stack, when processing the XI2 events. Here at the compression step we can simply extract the necessary sourceId by reading the sourceId offset in the data. Task-number: QTBUG-68033 Change-Id: I6962bbb8f8b0834d6f780f62017fefa2de7f47df Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Merge 5.11 into 5.11.1Oswald Buddenhagen2018-06-072-0/+11
| |\ | | | | | | | | | Change-Id: I28f48e980a9e23ddde5251608dd9d1d83df65392
| * | iOS: Guard all uses of APIs not available in application extensionsTor Arne Vestbø2018-06-0512-30/+88
| | | | | | | | | | | | | | | Change-Id: Ic058a0c07f6cdd0a015f46db96fce1536a712711 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@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>
* | | QNX: Add QQnxEglWindow::format() overloadTakumi ASAKI2018-06-081-0/+2
| |/ |/| | | | | | | | | | | | | QQnxEglWindow should return correct QSurfaceFormat. Task-number: QTBUG-64306 Change-Id: I3ba2a9d84f39af66c3b8f58ae3e26edc695f5612 Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* | 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)
* 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>
* 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>
* | | Fix building with -no-feature-shortcutJoni Poikelin2018-05-082-0/+10
| | | | | | | | | | | | | | | Change-Id: I7576055a6d81d6a7a075ebff16ca6b0ced4e984e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | 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>
* | | 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>
* | | Configure window manager to support RCar D3Timo Aarnipuro2018-05-031-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize the device earlier and enable the screen as well. These changes are also compatible with the RCar H3. Change-Id: I4a83dedc0eed9df181c32e60ebf3666824d2a6c6 Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@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>
* | | Feed external geometry changes to QtJames McDonnell2018-05-022-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that Qt responds correctly when window managers make geometry changes. Note: Older versions of screen, such as the screen from the QNX 6.6.0 4036 patch, don't produce SIZE/POSITION property events. Change-Id: I7e1e5982a2cbd3f57d468b43869af8558c6d50e7 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | Add screenContext native propertyJames McDonnell2018-05-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Retrieving it via some other screen object can be painful especially when there isn't a readily available screen object to use. Change-Id: If13e808435ea6f2909d5b4c3c5c736950e00aa5a Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | Flush the initial clear blit with SCREEN_WAIT_IDLEJames McDonnell2018-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without it, the clear runs asynchronously and screen may clear pixels _after_ Qt updates them. Change-Id: I0c0844676d8a4387439a2f818ee08942ccaf6b08 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@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>