summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* wasm: fix non-void function returnLorn Potter2021-06-211-2/+3
| | | | | | Pick-to: 6.2 Change-Id: Ia7ef3367c0531f953c78e43297f67d61b08dbf17 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Resend event if the first input method event changes focusVolker Hilsheimer2021-06-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractItemView opens the editor and changes focus in response to the first QEvent::InputMethod event. Changing focus however cancels the current composition, so the key press is lost and needs to be repeated by the user. What QAbstractItemView does is probably not that unique, so fixing this there - if possible at all - is not a general solution. In the platform specific input method handling code, we can generally discover that the focus object changed in response to the InputMethod event that gets sent to the focus object. On macOS, we can then pass the key event to the input method once more, which works fine. On Windows and X11, the situation is more complicated. That the focus changed is easily discovered, but re-sending the key press in such a way that the input method responds doesn't seem possible. On Windows, using SendInput simply delivers the exact key to the focus object, without starting the expected composition. On X11 with IBus, it should be possible to call ProcessKeyEvent again on the IBus input context when we discover in filterEventFinished that the focus object changed while delivering the event. However, any attempt to do so has no effect. So, for now only fixing this for macOS. Task-number: QTBUG-54848 Change-Id: I0f7b786cfa57430e6a1e7d605415265cf53eb675 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: fix QWindow::startSystemMove()/Resize() triggered by touchLiang Qi2021-06-164-7/+19
| | | | | | | | | | Abort the system move/resise at XCB_INPUT_TOUCH_END. Limit the behavior only on supported platforms, such as KDE and OpenBox. Change-Id: I53c86979ca56f4de8c5cf2807f781abdad6987b2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* xcb: fix QWindow::startSystemMove()/Resize() triggered by mouseLiang Qi2021-06-164-8/+60
| | | | | | | | | | | | | | | | We can't get mouse release event from master pointers after QXcbWindow::doStartSystemMoveResize() which calls xcb_ungrab_pointer(), it looks like most X11 WMs work as that. So we try to get mouse release event from slave pointers. Based on https://specifications.freedesktop.org/wm-spec/1.4/ar01s04.html , we need to send _NET_WM_MOVERESIZE_CANCEL when we get mouse release event. Task-number: QTBUG-91077 Change-Id: I01e74a01c87b381ee7cd6f20d51a1fa61c0e98fc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* iOS: cleanup connection when a screen disconnectsRichard Moe Gustavsen2021-06-161-1/+3
| | | | | | | | | | | | | | | | The iOS port creates one QIOSViewController per connected screen. And each view controller listens for changes to the application state. The problem is that we never disconnect this connection again. So if a screen is removed, and the corresponing view controller is deallocated, the connection is still kept alive. This will cause crashes to occur when the signal emits, since the slot will then be accessing deleted memory. Fixes: QTBUG-76948 Pick-to: 6.2 6.1 5.15 Change-Id: I758e51af9297cd62de193aae825f4475a2c7c3e5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port some fallthrough comments to Q_FALLTHROUGHGiuseppe D'Angelo2021-06-131-1/+1
| | | | | Change-Id: I70dd492d5c8d198589bfd642db63182cf17b133f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Allow programatically minimizing frameless windowsMorten Johan Sørvig2021-06-091-1/+4
| | | | | | | | | | NSWindowStyleMaskMiniaturizable also controls programatic minimize, in addition to the window decoration button. Fixes: QTBUG-65637 Pick-to: 6.2 6.1 5.15 5.12 Change-Id: Iac5fb483433441173d770f4fcfb9e93440b9fe6a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Keep NSWindow alive after handling windowShouldClose callbackTor Arne Vestbø2021-06-091-0/+9
| | | | | | | | | | | | | | | | | | | | | Option-clicking the close-button on a window in macOS is a request to batch-close all the windows. When this happens we get an event in through the window that was clicked, which in turn results in AppKit calling windowShouldClose: for each window. We respond to that by explicitly closing each window (instead of just responding YES or NO), which results in the window being released and deallocated. This causes a crash when AppKit then follows up by closing each window after we responded YES to windowShouldClose. We work around this by keeping the window alive in the closest auto release pool, which is typically at the level of the runloop. This ensures that the window is alive for the duration of the logic that AppKit has for batch-closing windows. Fixes: QTBUG-92232 Pick-to: 6.2 6.1 5.15 Change-Id: I68b6138eb8325af0576b438ffa011137fec27926 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* windows: gl: Print GetLastError() when makeCurrent failsLaszlo Agocs2021-06-081-1/+6
| | | | | | | | | | | | | This matches the behavior of other implementations, such as QEGLPlatformContext: doing a qWarning with the relevant error from eglGetError() or equivalent is helpful when something goes wrong and should be common among QOpenGLPlatformContext implementations. Pick-to: 6.1 Task-number: QTBUG-85714 Change-Id: Ifa5d22b83808c92ae92efcbcddc8d8c3d3ba34b1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android: fix mimetype/namefilters handling for FileDialogAssam Boudjelthia2021-06-021-8/+9
| | | | | | | | | | | | | | | | | | | | Android file dialog uses setType() to set the main mimetype for the dialog if no mimetype or multiple (+1) mimetypes are provided, then the additional mimetypes can be provided via EXTRA_MIME_TYPES flag. The problem was that the mimetypes deduction from the namefilters was: * the namefilter used was empty, now we take the first item nameFilters(), because mimetypes cannot be changed once the dialog is open anyway. * The regex extraction was getting a namefilter ending with an empty char and that was giving a mimetype of any format thus making it show all possible files. Pick-to: 6.1 5.15 Fixes: QTBUG-83089 Change-Id: Ifaef40c2186732ad3a604d28e086409c35dafacf Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* wasm: map named key attribute “Meta” to Qt::Key_MetaMorten Sørvig2021-06-021-0/+1
| | | | | | | | | This value is sent by Apple keyboards, and was missing from the table. Change-Id: I49ad7ea74f2571c60ee9f2547468777b1f4585d8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* xcb: Fix touch grab handling on pre-XI 2.2Povilas Kanapickas2021-06-011-4/+6
| | | | | | | | This is only a theoretical bug fix because systems that don't support XI 2.2 are ten years old by now. Change-Id: Ia3770a6ca626b60d0f1e4cd2fdc611adf99cbf25 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add the 'Private' suffix to the internal module namesAlexey Edelev2021-05-314-29/+29
| | | | | | | | Rename internal modules to adjust their names to the internal module policy. Also modify mappings of the qmake file converters. Change-Id: I69aee1e8136c2379608d9d22d718f8c8a5f73124 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* wasm: fix screen offset logicLorn Potter2021-05-271-2/+2
| | | | | Change-Id: Id71dfcba5d0bc1fe660a478db5f4c57e68468b4b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: don't show invisible separator itemsVolker Hilsheimer2021-05-272-3/+8
| | | | | | | | | | | | Give QCocoaMenu access to the item's visibility property by adding a public getter, and respect that state when syncing the separator to the corresponding QCocoaNSMenuItems. Pick-to: 6.1 5.15 Fixes: QTBUG-88651 Change-Id: I7e238e5d3be141ec8f4e8f6f3ab22d761094d2d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Add explicit default constructor for QEglFSContextJanne Koskinen2021-05-271-0/+1
| | | | | | | | Fixes Integrity compiler issue where it cannot find implicitly defined Change-Id: I126333dd4b02b9b653b8e1ac5da07679b343c91f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
* Silence warning C4996 (use of deprecated GetDesktopDpi)Kai Köhne2021-05-272-0/+6
| | | | | | | | | | | | | | Silences warnings warning C4996: 'ID2D1Factory::GetDesktopDpi': Deprecated. Use DisplayInformation::LogicalDpi for Windows Store Apps or GetDpiForWindow for desktop apps. Using GetDpiForWindow sounds like the right approach, but it's not obvious where to get the window handle from here. Task-number: QTBUG-94043 Pick-to: 6.1 Change-Id: I2fc005e0c970c8338184f4500b876774ec9d976b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Qt xcb: remove false detects of Qt::GroupSwitchModifierAleksei Nikiforov2021-05-261-3/+3
| | | | | | | | | | | | | | | | | In some cases, if X11 is configured with CapsLock as keyboard language switch key, and CapsLock is toggled via Shift+CapsLock key combination, toggled CapsLock is falsely detected as Qt::GroupSwitchModifier for subsequent key events. This change fixes this false detect, but doesn't fix detection of Qt::GroupSwitchModifier which is likely still broken. Fixes: QTBUG-49771 Pick-to: 5.15 6.0 6.1 Change-Id: I485e2d4f3c654707c62adaba367c1b8afb3fc36c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Android: Fix select handles misplacement on QDialogPekka Gehör2021-05-253-8/+43
| | | | | | | | | | Get select handles {Left, Right}Point from a mapToGlobal with a cursorRectangleof anchorRectangle of the selected word/text. Task-number: QTBUG-90799 Change-Id: I4fed19a1d3bb2247656b052306307e6980074405 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* wasm: fix tooltips show/hide behaviorLorn Potter2021-05-211-1/+9
| | | | | | | | | | When tool tip was trying to show its window became activated causing tool tip to hide instantly due to a redundant window activation bug on show/hide/raise/lower. Fixes: QTBUG-91095 Change-Id: Id215400a79cdc4ed1961731949ca139b575eec88 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: Fix visual representation to not show tool tip window title barLorn Potter2021-05-222-2/+15
| | | | | Change-Id: I1adf841a97daa64cd8a0ae799235d99bf961171f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Restore logic to set wantsBestResolutionOpenGLSurfaceTor Arne Vestbø2021-05-201-0/+8
| | | | | | | | | | | | | | | | The logic was removed in 1fc7ca091b3fdda52381a383318a3a752ec21132 when we removed support for surface-backed views, based on the documentation for wantsBestResolutionOpenGLSurface noting that layer-backed views ignore the property. But in some cases, when plugin views are embedded into host views, and the host was built with a pre-10.14 SDK, AppKit seems to get confused, and we still need to set this property. Fixes: QTBUG-93770 Pick-to: 6.1 Change-Id: Id67f2fcb8c090c0e01c05d00792eaef311146df1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* wasm: disable the canvas resize observerMorten Sørvig2021-05-201-1/+0
| | | | | | | | | | | | | | We’re seeing crashes on tab close and also when the page has been open for a minute or two. Skip installing the handler until we figure out what’s wrong. Pick-to: 5.15 Fixes: QTBUG-93713 Change-Id: Idd0c4d646de544ebdd2f4d00425faa08645335ac Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* macOS: Fix warning about comparing different types in QCocoaScreen::isOnlineTor Arne Vestbø2021-05-201-2/+2
| | | | | | Pick-to: 6.1 Change-Id: Ieb70108d22bf254c69665e5b3e3a2988703e26a2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QXcb: don't dereference pointer before checkingVolker Hilsheimer2021-05-201-1/+2
| | | | | | | | | | | | | | The virtualDesktop pointer is expected to be populated by queryPointer, but that method handles the case that there either is no reply, or that the reply doesn't match, in which case the pointer remains nullptr. Don't dereference it afterwards without checking. Addresses code checker warning a179d1087759bb6ca9c3380257bd70d6 Pick-to: 6.1 5.15 Change-Id: I5877f26fd3b49327c0de3f2c918bb606bee8ac57 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add EGLFS OpenWFD plugin for INTEGRITYKimmo Ollila2021-05-193-1/+27
| | | | | | | | | This enables OpenWFD EGLFS integration plugin and makes EGLFS the default platform for INTEGRITY builds. Change-Id: I65332ca0ae244f40013df435828e2e359200b325 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix BASE argument of qt_add_resourcesJoerg Bornemann2021-05-181-87/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BASE argument of qt_add_resources now denotes the root point of the alias of the file. Before, BASE was merely prepended to every file that got passed to qt_add_resources. Old behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "images/button.png") Alias is "../shared/images/button.png", and pro2cmake generated QT_RESOURCE_ALIAS assignments to fix this. New behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "../shared/images/button.png") The alias is "images/button.png". No extra QT_RESOURCE_ALIAS assignment is needed. The new behavior is in effect for user projects and for Qt repositories that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Qt repositories will be ported one by one to this new behavior. Then the old code path can be removed. Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* iOS: Accessibility: Set the correct traits for EditableTextAndy Shaw2021-05-141-1/+9
| | | | | | | | | | | | Since the correct accessibility traits for EditableText are not available as a direct enum value, then we depend on the defaults for a UITextField to give us this information. Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Fixes: QTBUG-93494 Pick-to: 6.1 5.15 5.12 Change-Id: If428414aec5ce571f0f8c0ecccffdbaf1c908120 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* cocoa: be more careful about rejecting frame strut eventsRichard Moe Gustavsen2021-05-121-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The m_buttons property is meant to hold the currently pressed mouse buttons done on the contents part of a QNSView. But m_buttons can sometimes get out of sync with AppKit (NSEvent.pressedMouseButtons). One way this is shown to happen is if you do a mouse press on a native child widget (that is backed by it's own QNSView), and then convert the widget to a top-level window before the release. In that case, the underlying QNSView will be reparented from one NSWindow to another, which will result in the old NSWindow getting the mouseUp call instead of the new window. The result is that we don't update m_buttons for the reparented QNSView, which will instead be left as "pressed". As a result of m_buttons being stuck in a faulty state, we also refuse to send out QEvent::NonClientAreaMouseMove events to the top-level widget. This because QNSView thinks that it's already in a dragging state that started on the content part of the view (and not on the strut). As a result, it can sometimes be impossible to dock a QDockWidget back into a QMainWindow, since we basically don't send out any frame-drag events to Qt for the new dock window. We can reason that if you start a mouse press on the frame strut, you cannot at the same time have an active mouse press on the view contents. This patch will therefore remove the buttons that we know was pressed on the frame strut from m_buttons. This will at least (be one way to) clear the faulty pressed state, and will let us send mouse press/drag/release (and after that, move) frame strut events to Qt. Pick-to: 6.1 5.15 Task-number: QTBUG-70137 Change-Id: If51e1fe57d2531b659d39de85658893dae6391e3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: fix unicode keyboard handlingLorn Potter2021-05-121-145/+9
| | | | | | | | | | | We can simplify and reduce the lookup table by casting to unicode for all printable keys. This means that non US/ASCII keyboards will have better support. Pick-to: 5.15 Fixes: QTBUG-84494 Change-Id: I60aa6320cf1b5d82910ed77e136246d301bfc09a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows QPA/Vista style: Fix placeholder colorFriedemann Kleint2021-05-111-1/+10
| | | | | | | | | | Bring back the code that was removed by 62c3dd5632b04a7ee2410cc2233c0d0605ad5bd6 to the Windows theme. Pick-to: 6.1 Fixes: QTBUG-93635 Change-Id: I066e89d482a584c1719f6bfb6160710ee73e1b81 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* macOS: Remove MIME plumbing from QCocoaNativeInterfaceTor Arne Vestbø2021-05-112-19/+0
| | | | | | | | | | The functions are available as private API though qt_mac_addToGlobalMimeList and qt_mac_removeFromGlobalMimeList for those that need it. Task-number: QTBUG-83252 Change-Id: Ibc17aedd9aaced236a082d3d8de4b28313406a02 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix passing QJniEnvironment to ANativeWindow_fromSurfaceMarius Kittler2021-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The function ANativeWindow_fromSurface (as declared by `$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/native_window_jni.h` from version r22.b of the Android NDK) takes a `JNIEnv*` so `.jniEnv()` must be used. This prevents the following compilation error: ``` error: no matching function for call to 'ANativeWindow_f romSurface' m_nativeWindow = ANativeWindow_fromSurface(env, m_androidSurfaceObject.object()); ^~~~~~~~~~~~~~~~~~~~~~~~~ /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/native_window_jni.h:45:16: note: candidate function not viable: no known conversion from 'QJniEnvironment' t o 'JNIEnv *' (aka '_JNIEnv *') for 1st argument ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface); ^ 1 error generated. ``` Pick-to: 6.1 Change-Id: I70d75cb7edc5875314fcb8a70d51d0ef40442101 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* iOS: Accessibility: Don't cut off the last character from the text valueAndy Shaw2021-05-071-2/+1
| | | | | | | | | | | The second parameter is the position of the first character not to be returned when calling text(). So it needs to be passed the length of the text, otherwise the last character is cut off. Task-number: QTBUG-93494 Pick-to: 6.1 5.15 5.12 Change-Id: I7dd8324b3939220de125ba819b7b77588b21bd4b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: Update _NET_SUPPORTED when the window manager changes itTang Haixiang2021-05-071-0/+2
| | | | | | | | | | In some cases, the application may start before the window manager, and in some window managers _NET_SUPPORTED may be changed. These situations will cause the _NET_SUPPORTED value obtained by Qt to be inconsistent with the window manager. Fixes: QTBUG-91396 Change-Id: I63c6934ad2538cdb9f05926b3748216bd0dcf04e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove Qt6 ifdef switches from pluginsAllan Sandfeld Jensen2021-05-077-38/+0
| | | | | | | Removing dead code Change-Id: I368fcec95d230e1face18062ff19704608354654 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* macOS: in password lineedits, pass dead keys to the input methodVolker Hilsheimer2021-05-062-1/+7
| | | | | | | | | | | | | | | Otherwise the IM cannot correctly compose the input, making it impossible to enter e.g. ü or ~ on certain keyboard layouts. Note that the native macOS NSSecureTextField does not allow that either, which is however a very bad user experience. With this change, the modifier characters like ¨ diacritics will be visible when entering them in either NoEcho or Password line edits. The follow-up commit will remove those as well. Fixes: QTBUG-84664 Change-Id: Ib4c5ab85634c17c407623f82b46c4849c72d9e69 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Put the GLX related code under the xcb_glx_plugin conditionAlexey Edelev2021-05-062-3/+10
| | | | | | | | | | If the xcb-glx-plugin feature is not enabled we should not compile classes and methods that use the GLX related code of the QOffscreenIntegrationPlugin. Pick-to: 6.1 6.0 Change-Id: I63eff9d0a2afc1bc1fa21ee1b49f854f13b94c93 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use templated QJniObject::object() instead of static_castAssam Boudjelthia2021-05-063-4/+4
| | | | | | | Change-Id: I3bf366967d7995621aba1a7c1bec6732f3ef957d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* iOS: Keep undo/redo widgets enabled on the undo shortcut bar after undoTamás Martinec2021-05-051-1/+14
| | | | | | | | | | | Having two undo/redo operations on the rebuilt undo stack always enables the undo/redo widgets on the shorcut bar. This might be more desirable than the current behavior that only allows one undo from the shortcut bar. Pick-to: 6.1 6.0 5.15 Fixes: QTBUG-63393 Change-Id: I2c99f27895def47b58534035461ceb7b4e5c3057 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* cocoa: move DEBUG_PASTEBOARD into logging categoryLiang Qi2021-05-053-62/+21
| | | | | | Pick-to: 5.15 6.1 Change-Id: I8f49c030588122adff3c0eab4189bfa7e6aeff09 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* iOS: Implement QIOSScreen::logicalBaseDpi()Morten Sørvig2021-05-032-2/+2
| | | | | | | | | | | | | | | logicalDpi() and logicalBaseDpi() should return the same DPI on iOS, in order to make Qt not apply a scale factor. Accomplish this by overriding logicalBaseDpi() instead of logicalDpi(). The default QPlatformScreen::logicalDpi() implementation will then call logicalBaseDpi(). Pick-to: 6.1 Fixes: QTBUG-92579 Change-Id: I7a27cf61f0154cef32098069ab3dfb29ad6acf27 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Android: Fix Application becomes unresponsive issuePekka Gehör2021-05-033-0/+11
| | | | | | | | | Block key events until the plugin is running. Fixes: QTBUG-67944 Pick-to: 5.15 6.1 Change-Id: Iea47f2e94d850141834a7e8fc26218be2cacf660 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add missing case for ResizeNoneMorten Sørvig2021-04-301-0/+3
| | | | | Change-Id: If7c5fb0aa7d00745da54b1184d192c8921668075 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QVnc: clip requested screen region to available screen imageEirik Aavitsland2021-04-301-2/+3
| | | | | | | | | | Avoid potential oob memory access. Pick-to: 6.1 6.0 5.15 5.12 Fixes: QTBUG-91770 Change-Id: I34fff1cf8dec5275572a027288b0e8310359d9f8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* macOS: Don't override action set during drop handlingAndy Shaw2021-04-291-1/+3
| | | | | | | | | | | | | | | | When the drop has been handled, the target might have accepted a specific action by calling QDropEvent::setDropAction. Don't override that with the operation received by the OS if the drag'n'drop operation takes place within the same application. If the operation comes from outside, we have no choice but to trust the OS. This way the drag-site will get the action accepted by the drop-site when QDrag::drag returns. Fixes: QTBUG-77427 Pick-to: 6.1 6.0 5.15 Change-Id: I0e4c86adeeea66b345966a03a3251fa62263b3e8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Call updateHighDpiScaling() on screenAdded()Morten Johan Sørvig2021-04-282-2/+0
| | | | | | | | | | | | | | | | | | | | | | QHighDpiScaling has two init/update functions: - initHighDpiScaling(): called once during QGuiApplication construction - updateHighDpiScaling(): called whenever (relevant) screen configuration changes Currently the calls to updateHighDpiScaling() are made from multiple places including platform code. Simplify by calling it from two locations: - QWindowSystemInterface::handleScreenAdded() - QGuiApplicationPrivate::processScreenLogicalDotsPerInchChange() Replace comment about early calls to qt_defaultDpi with a test which calls qt_defaultDpiX/Y with no screens attached. (Looking at the qt_defaultDpiX() implementation, it is unlikely that there will be a problem as long as updateHighDpiScaling() is called before QGuiApplication::primaryScreen() starts returning a non-null value.) Change-Id: I447db42894617495843a5cb531a1322b000fed62 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add storage for (pixel) deltas and fingerCount to QNativeGestureEventShawn Rutledge2021-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | It's not clear now whether trackpad gestures on Windows will need to be so different than on macOS; however, any reasonable int value can be stored in a qreal, and in Qt Quick we like to use floating-point numbers for all "real" values and measurements. So since we need to add more storage, and quint64 m_intValue has never been used, we now replace it with a QVector2D, which should have the same size. The intended use is that PanNativeGesture will include a displacement, probably in pixels, by which the viewport or some target item should be panned or moved. The naming of deltas() is flexible enough to support any gesture with some incremental 2D valuators, though, just as value() has gesture-dependent semantics. fingerCount() will be useful for Qt Quick pointer handlers to filter out events that have the wrong number of fingers, e.g. to require that either a 3-finger pan gesture or 3 individual touchpoints are required to activate DragHandler { minimumPointCount: 3 } (assuming we implement pan gesture support in DragHandler). Fixes: QTBUG-92179 Task-number: QTBUG-92098 Change-Id: I5462aea9047beed6e99075294a62011edd8a59f5 Reviewed-by: Povilas Kanapickas <povilas@radix.lt> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* xcb: Add more debug info for XCB_INPUT eventLiang Qi2021-04-261-1/+44
| | | | | | Pick-to: 6.1 6.0 5.15 Change-Id: I99bba80659a103aa79426ae94cd04db2c5d851d6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Lowercase system includes and lib names for Windows, fix cross compilingMartin Storsjö2021-04-232-2/+2
| | | | | | | | | | | | | | | When cross compiling from a case sensitive file system, casing matters, and mingw headers and import libraries consistently use lowercase. This was uncovered by d385158d5213ef568b7629e2aa4a818016bbffac; prior to that, the schannel TLS plugin didn't end up built (at least when cross compiling). Fix other similar cases that can be found by grepping the repo. Change-Id: Ia696e17b7aaa979d7b7f5b0801383f338a8b585b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>