summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt_delegate_client.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix wrong assumption about focus in/out event deliveryMichal Klocek2022-03-181-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2947d79d assumption was made that we never get focus in event for popup reason. Unfortunately this is not true as simply creating window menu and switching between webengineview will trigger the issue. Moreover, focus in and out events with popup reason do not mean change of focus, as in qtbase: if (QWidget *fw = active_window->focusWidget()) { if (fw != QApplication::focusWidget()) { fw->setFocus(Qt::PopupFocusReason) } else { QFocusEvent e(QEvent::FocusIn, Qt::PopupFocusReason); QCoreApplication::sendEvent(fw, &e); } } Therefore it is safe to ignore focus in/out events with popup reason. Note that the fact that ASSERT got not triggered for context menu is due to another race condition issue in qquick event stack delivery. This commit amends 2947d79d8210a7ae4ce2bc02e058628e66011be3. Fixes: QTBUG-101706 Change-Id: I3e761fe5d8054aed72461eba7981c69755877d1b Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit 0625a1e16b8698d9c344548e4e929fb385b6a542) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Cleanup code and clang build warningsKirill Burtsev2022-01-021-3/+3
| | | | | | | | | Fix build noise as reported by clang for issues like api deprecation, unused variables, sign/unsigned mismatch and other non critical issues. Pick-to: 6.2 Change-Id: I4fba25406eea8170e3283c42e908ae86bd512e3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for Chromium 92Allan Sandfeld Jensen2021-12-021-1/+1
| | | | | Change-Id: I1849c130ca75615802744275f6e4212a755c39b4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix pinch gesturePeter Varga2021-10-121-1/+2
| | | | | | | | | | | | | | | Pinch gesture on a touchpad is expected to zoom-in and zoom-out. It has been broken since the pinch gestures are routed because for routing the event target has to be found. The event target is only tried to be found on a pinch begin gesture. As a fix, handle Qt::BeginNativeGesture and Qt::EndNativeGesture events too. Fixes: QTBUG-96930 Pick-to: 6.2 5.15 Change-Id: Ic8fe5bee933b5e0fbc8f5ba6234363a0a625648d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove our handling of IME hidden text supportAllan Sandfeld Jensen2021-09-221-19/+3
| | | | | | | | | | QtBase should be disabling it now, if not supported. Pick-to: 6.2 Change-Id: I79bae11764d3cbaba1ae1e0987bf0a472eee3325 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove outdated QT_VERSION_CHECKsAllan Sandfeld Jensen2021-07-091-4/+0
| | | | | | Pick-to: 6.2 Change-Id: I4c4b78af0bd7da5912b5e0136f9cfdb3c4268a7e Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Fix compile warningsBalazs Egedi2021-05-021-3/+3
| | | | | | | Remove unused code and fix comparison between enum types. Change-Id: I78244462bea1e968a6bdff2db5b7ebad60bd25b4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-03-161-10/+23
| | | | Change-Id: I0dd7c64669f4b130047a4a3836f62f7ee5b5f8d9
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-01-251-16/+14
| | | | | | Including update to 87-based Change-Id: I36b6054e00de97ab055d0bc800cff08d0408fac6
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-12-111-85/+114
| | | | Change-Id: Id1a1f4ca84697ba18e2604090e3154295fe1858b
* Clone QEvents instead of copyingPeter Varga2020-12-101-2/+1
| | | | | | | Copying QEvents is disabled in the latest QtBase. Change-Id: I2735fd412a47deb5fb389615c73881aa6cce61ca Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/certificate_error_controller.cpp src/core/certificate_error_controller.h src/core/compositor/compositor.cpp src/core/compositor/compositor.h src/core/compositor/display_gl_output_surface.cpp src/core/content_browser_client_qt.cpp src/core/core_chromium.pri src/core/delegated_frame_host_client_qt.cpp src/core/ozone/gl_share_context_qt.h src/core/ozone/surface_factory_qt.cpp src/core/permission_manager_qt.cpp src/core/render_widget_host_view_qt.cpp src/core/render_widget_host_view_qt.h src/core/web_engine_context.cpp src/core/web_engine_settings.cpp src/core/web_event_factory.cpp tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp Change-Id: Ice14c3c350b139e800c7c7011b7cef1fc7010669
* Fix compilation after 4e400369 in baseMichal Klocek2020-08-181-5/+5
| | | | | | | | | This change requires follow up to implement conversion between tablet events in qt and motion events in chromium, since touch events in qt come from 'finger'. Change-Id: Idf8ebd48dfdcd9c1618cbb8d5a621843656b145f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix almost all deprecation warningsJüri Valdmann2020-08-131-9/+9
| | | | | | | | | | | | | | | | | | | | | | Replace QString::fromUtf16({const ushort * -> const char16_t}) QMap::{unite -> insert} Q{Hover,DragEnter,DragMove,Drop}Event::{posF() -> position()} Q{Hover,DragEnter,DragMove,Drop}Event::{pos() -> position().toPoint()} Q{DragEnter,Drop}Event::{mouseButtons -> buttons} Q{DragEnter,Drop}Event::{keyboardModifiers -> modifiers} QMouseEvent::{localPos -> position} QMouseEvent::{windowPos -> scenePosition} QMouseEvent::{screenPos -> globalPosition} These should all be just renames without any change in behavior (save for some floating point conversions). The one remaining issue concerns the deprecation of binary JSON in qtbase, which is recommended to be replaced with CBOR. Change-Id: I8f3b533242fe9a58c08c2b09ff5d0bdbbfa6dd17 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devMichael Brüning2020-07-241-1/+4
| | | | | | | | | Conflicts: src/core/compositor/delegated_frame_node.cpp src/core/core_chromium.pri src/core/render_widget_host_view_qt.cpp Change-Id: I9387151e9647c87fc387095e7b6d8d66560cdf71
* Move scenegraph handling out of coreJüri Valdmann2020-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace Display{Producer,Consumer,FrameSink} with the new classes Compositor and Compositor::Observer. The Compositor subclasses are implemented by the OutputSurfaces, replacing DisplayProducer in this role. Unlike DisplayProducer, the new classes do not use QtQuick scenegraph types, but rather give access to the software QImage or OpenGL texture directly. The connection to the "other half" is simplified by replacing DisplayConsumer with Compositor::Observer, which is no longer implemented by RenderWidgetHostViewQt, but directly by its delegates in the quick and widgets libraries. RenderWidgetHostViewQt now only provides the delegate with a Compositor::Id which is used to connect the corresponding Compositor and Observer. The delegates are responsible for generating QtQuick scenegraph nodes from the information provided by the Compositor subclasses. Behavior with software and old OpenGL scenegraph backends is unchanged: both continue to work. As for the RHI scenegraph backend, the code here is correct but nonetheless not working: changes are needed in qtbase to make RHI use the global share context for its OpenGL context. Fixes: QTBUG-78682 Change-Id: I837da8860a18ec366ed33f6ecc44c147245e1101 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Refactor RenderWidgetHostViewQtPeter Varga2020-06-171-0/+973
Make RenderWidgetHostViewQtDelegateClient class instantiable and remove its implementation from RenderWidgetHostViewQt. Change-Id: Idcad3a805defe8b910f418b91f14808b6dbf083b Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>