summaryrefslogtreecommitdiff
path: root/src/compositor/compositor_api
Commit message (Collapse)AuthorAgeFilesLines
* compositor: adapt to new QXkbCommon::modifiers()Mario Roessel2023-04-241-1/+1
| | | | | | | | Pick-to: 6.5 Fixes: QTBUG-111503 Done-With: Liang Qi <liang.qi@qt.io> Change-Id: Ib6adb03575c06f667ec5d7a0139b4396888d4010 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Document sendFullKeyEvent() and sendKeyEvent() limitationsPaul Olav Tvete2023-04-181-0/+8
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-112853 Change-Id: I5ae7ee194e8415c5e34ecde2d93086885866abfd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* tests: fix tst_WaylandCompositor::simpleKeyboard()Andrey Butirsky2023-03-311-1/+1
| | | | | | | | | | | | | since the default value of superAsMeta and hyperAsMeta in QXkbCommon::keysymToQtKey() were changed in qtbase 610bafdfc58e90f24e3908e1a5932e2f510eac7e. And Qt Wayland Compositor needs to distinguish Super/Hyper/Meta keys. Fixes: QTBUG-111423 Change-Id: I531c4f6adc019e59d4a7d57853a459ea512028a2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Forward active focus to clients immediatelyBernd Weimer2023-03-162-2/+13
| | | | | | | | | The acitve focus has only been set in clients when a key was pressed. This caused Qt clients to miss the pressed key event. Fixes: QTBUG-108645 Change-Id: Ie277d64e4e707533d84179c01a69a745cb4da950 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* doc: Remove category from examples docsEskil Abrahamsen Blomfeldt2023-02-281-1/+1
| | | | | | | | | | | | | | Remove redundant categorization from example title as according to example guidelines. The examples are already categorized under Qt Wayland Compositor Examples, so adding it to the title makes the list a bit cluttered. Pick-to: 6.5 Task-number: QTBUG-110993 Change-Id: I91ad127611c7b1e4d8c558377bc5f46e0ec28a41 Reviewed-by: Inho Lee <inho.lee@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add WL_SHM_FORMAT_RGB888 to supported shm formatsThomas Senyk2022-12-131-0/+1
| | | | | | | | | | In addition a new entry in QWaylandCompositor::ShmFormat allows compositors to enable that format at runtime Pick-to: 6.5 Change-Id: I0f894adb3f688458a65713e343127fbcb26f8b65 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* compositor: fix build without quickLiang Qi2022-12-091-0/+4
| | | | | Change-Id: Ic9ff039028e509c3e09d446f85648fe063f4749f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* compositor: Fix warning on damage/damage_buffer mixEskil Abrahamsen Blomfeldt2022-12-072-27/+22
| | | | | | | | | | | | | | | | | The damage() request has been deprecated in favor of the damage_buffer() request, which is the one we use in Qt 6 as long as the version is 4 or higher. See change: 314fd6db51277224cdc799b039ef79db1101f5cd. However, eglSwapBuffers() will in some drivers still send the old request, causing us to get a mix of incompatible requests, since they are in different coordinate systems. We need to store these separately so that we can apply them both correctly once we get a commit. Fixes: QTBUG-108765 Change-Id: I9bbe0c87731847a4fa1927957dfd8945bd49c474 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor_api: delete TexProvider properlyInho Lee2022-12-072-2/+21
| | | | | | | | | | | If a QuickItem used in a compositor has a texture provider, it is not destroyed before deleting QRhi. It makes a warning of unreleased resources. Fixes: QTBUG-108767 Pick-to: 6.4 Change-Id: Id86839f1de1ff4f374170627d9c1e02c4afb7301 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-102-8/+8
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: Ia64c6615ee81f7ad5d0658449b0ee347c3db8c29 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Port from container::count() and length() to size()Marc Mutz2022-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: I574208abc90a8042b500b3f96e3862b0ff339eb6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Replace qExchange with std::exchangeMarc Mutz2022-10-061-1/+1
| | | | | | | | | | None of these users require C++20 constexpr or C++23 noexcept, the only remaining difference between std::exchange and qExchange. Task-number: QTBUG-99313 Change-Id: Ic5a0bd36d715af2cbc5f9936fdff665ee6eeea4e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Update header files to fit syncqt standardsAlexey Edelev2022-09-285-11/+9
| | | | | | Task-number: QTBUG-87480 Change-Id: I83fd8b53ef7ee4eb068f26e717b37cb2e52fe874 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix potential nullptr access in the compositor when killing clientsRobert Griebl2022-06-171-2/+2
| | | | | | Pick-to: 6.4 Change-Id: Ie9e0a61fb26a305bc5b913dc95bdf31c1e7cb408 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1063-1783/+145
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I106d3a5d1a7b96250380b6f51a48f3b19d10e4d9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtWaylandCompositor: includemocsLiang Qi2022-06-0112-0/+24
| | | | | | | Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-103295 Change-Id: I2311465d5341fc5902981d80ab0a117dd2df002d Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtWaylandCompositor: includemocs - qt6Liang Qi2022-06-011-0/+2
| | | | | | | Pick-to: 6.3 6.2 Task-number: QTBUG-103295 Change-Id: Ica578e313dfcea3ec9f2c426fab9d1b643286bb5 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add a TU for qwaylandcompositorquickextensions_p.hLiang Qi2022-06-011-0/+36
| | | | | | | | | | | | Just to include the moc file. It's otherwise the only one left in mocs_compilation.cpp and we might want to introduce a warning later on if something ends up in there, to maintain the newly-established includemocs level. Pick-to: 6.3 6.2 Task-number: QTBUG-103295 Change-Id: Ic4dd94ab1a6ca20c4e0350066c875895841f4168 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* compositor: Fix build without xkbcommonSamuli Piippo2022-05-101-1/+1
| | | | | | | | | | | This amends 4910b7adfa706520cd5180d5384b999488550aef. QWaylandKeyboardPrivate::resetKeyboardState() is behind an #if. We need to match the condition for the definition as well. Fixes: QTBUG-103341 Change-Id: Ib0b5b6284cac10a0cb5d53fca08e0d7226e7240a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* compositor: Fix build without xkbcommonEskil Abrahamsen Blomfeldt2022-05-101-0/+4
| | | | | | | | | | | This amends 4910b7adfa706520cd5180d5384b999488550aef. QWaylandKeyboardPrivate::resetKeyboardState() is behind an #if. We need to match the condition for the code that calls it. Fixes: QTBUG-103341 Change-Id: I6337a64870bb08930b0d19e03ca7fcc28e345493 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix: Access nullptr returned by QWaylandSurface::client()Roman Genkhel2022-05-101-1/+1
| | | | | | | | | surface()->client() could return null at the moment when QWaylandQuickItem::takeFocus invoked, which cause using nullptr Pick-to: 6.2 6.3 Change-Id: I89432882bd7117f45bac889bc85b2f86c77b21e8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Compositor: Re-enable touch events for Wayland clientsEskil Abrahamsen Blomfeldt2022-05-041-0/+1
| | | | | | | | | | | | | | | | | | | As documented, setAcceptTouchEvents() would be implicit in calling setAcceptedMouseButtons() in Qt 5, but in Qt 6, this was changed. The result was that QWaylandQuickItems would never receive any touch events in Qt 6, even though the touchEventsEnabled flag is set by default. To fix this, we add an explicit call to setAcceptTouchEvents() to ensure the same behavior as we had in Qt 5. [ChangeLog][QtWaylandCompositor] Fixed a bug where multi-touch would not work with Qt Wayland Compositor. Pick-to: 6.2 6.3 Fixes: QTBUG-102829 Change-Id: Idc99c56a7cc8651da844be3ea238b8537891dd1f Reviewed-by: Liang Qi <liang.qi@qt.io>
* Clear keyboard modifier state when application deactivatesEskil Abrahamsen Blomfeldt2022-05-034-8/+53
| | | | | | | | | | | | | | | | | | | | | | When the application deactivates while a modifier is held down, the modifier would get stuck and be set for all subsequent shortcut events. This could easily happen when nesting a Wayland compositor inside another compositor and using ALT+TAB to switch to another application. The alt modifier would then get stuck, since it never received any release event. When the application is inactive and then comes back, we can't know which keys are pressed, so it's better to just assume they are all cleared at this point. [ChangeLog][QtWaylandCompositor] Fixed a bug where keyboard modifiers would get stuck if the compositor was running nested inside e.g. X11 and then ALT-TAB was used to switch to a different application. This would cause shortcuts to misbehave. Fixes: QTBUG-101862 Change-Id: I9645418719d8ef8fc2ce2203ca5b6a159f3d9a7c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Doc: Fix QWaylandSurface::isOpaque property documentationTopi Reinio2022-04-061-1/+1
| | | | | | | | | | The \property command accepts no type, only the name of the property. Task-number: QTBUG-102185 Change-Id: Ia779a8c4097c7f4f1d1080b0e75114cea947578a Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Fix documentation warnings and enable doc testing in CITopi Reinio2022-04-061-3/+2
| | | | | | | Pick-to: 6.3.0 6.3 Fixes: QTBUG-102185 Change-Id: Ib2f6da8d7af63ef89dba2701bda562722dd9a12f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Move internal function to private classPaul Olav Tvete2022-03-294-16/+15
| | | | | | | checkAndRepairModifierState() was never meant to be a public function. Change-Id: Ia8946523b5ae79170490dc78a509ed1e132d9832 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Send correct modifier state for non-windowsystem key eventsPaul Olav Tvete2022-03-154-2/+60
| | | | | | | | | | | | | | | | | | | | | In the wl_keyboard protocol, key events and modifier state is sent separately. Currently, the modifier state is maintained by a QWindowSystemEventHandler that filters low-level QPA events. This does not work for key events that are injected from other sources, such as virtual keyboards, or remote UI connections. This change does not try to fix the architectural issue. It is just a workaround that detects when we try to send a key event with a modifier state that does not match the previous modifier state sent through wl_keyboard. In that case we send a wl_keyboard.modifiers() event that matches the modifiers of the key event. This is somewhat fragile, and will probably cause weirdness if native key events are interleaved with injected events, but it should behave better than the previous situation. Change-Id: Ic80198e7728edacfdcaf426bae54508a6576e8cd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Also accept a client text-input extension registered too lateDominik Holland2022-03-152-6/+15
| | | | | | | | | | | | | | | When the wayland surface gets initialized at the compositor side, the compositor checks whether the text-input extension is available and connects to its signal. If the client doesn't create the extension before the initialization on the compositor side happens, the InputMethodControl of the surface is not connected to the text-input extension and doesn't work correctly. In this case the connection should be made once the extension is available. Change-Id: Icdd015f1d7853fe2f191b91a87d25f196f6b7769 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* wayland: do not rely on transitive includesFabian Kosmale2022-03-111-0/+1
| | | | | Change-Id: I149e04d31ef3e897e25a91450427237069af4c34 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Make sure all private headers include at least one otherThiago Macieira2022-03-083-1/+4
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QWaylandBufferRef: fix relational operatorsMarc Mutz2022-02-282-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The relational operators were incorrectly declared as mutable member functions (they should have been const). In C++20 builds, this leads to ambiguities between these operators and their reversed versions. Even before C++20, one couldn't equality-compare two const QWaylandBufferRefs. The problem is that we cannot fix this in a forwards-binary-compatible way, because there's no way to implement the operator for lhs = const and rhs = const without adding a new symbol or breaking encapsulation of the class. Therefore, libQtWaylandCompositor is unfixably broken in Qt ≤ 6.2, unless we break forwards-BC as per this patch. There doesn't appear to be a specialized test for this class, so just check overload resolution using static_assert()s. [ChangeLog][QtWaylandCompositor][QWaylandBufferRef] Two const QWaylandBufferRefs can now be compared for equality (before, the LHS was not allowed to be const). [ChangeLog][QtWaylandCompositor][Potentially Source-Incompatible Changes][QWaylandBufferRef] The relational operators are now hidden friends (they were member functions before) which are only found by unqualified lookup. Pick-to: 6.3 Fixes: QTBUG-100845 Change-Id: If0ef6b3b6dafc6c9bf4dca02c5f26a08ed73815d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use opaque render list when client content is opaqueEskil Abrahamsen Blomfeldt2022-02-174-5/+37
| | | | | | | | | | | | | | | If the client says it's fully opaque through the set_opaque_region request, we can disable blending for the item and potentially improve performance a little bit. [ChangeLog][QtWaylandCompositor] The compositor now respects the opaque region set by the client and no longer applies blending or overdraw for fully opaque windows. Fixes: QTBUG-100373 Change-Id: Iaa68fbf1f086d926c9c1867d981a63810f4ca855 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Call updateSize only for new windowsBernd Weimer2022-02-151-7/+7
| | | | | | | | | | | This avoids "No update on item size as the buffer is currently locked" warnings when windows are hold in a model and a window is closed and removed from the model. The problem was apparent in many QtApplicationManager examples. Pick-to: 6.2 6.3 Change-Id: Icb9d4cd37d3a4a8ee4214a92aed8422794729d9d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QtWaylandCompositor: use cmake-generated export headersMarc Mutz2022-02-1434-36/+36
| | | | | | | | Pick-to: 6.3 Change-Id: Ifda9223dbf9d7c615de6540250a23a6687daecd7 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix unused warningsShawn Rutledge2022-02-092-4/+1
| | | | | | | | | Unused lambda capture and private variables that clang complains about. Pick-to: 6.2 6.3 Task-number: QTBUG-100249 Change-Id: I204eea8d4fc0c22542224d94bae113fa66870d15 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Address API review comments for Qt WaylandEskil Abrahamsen Blomfeldt2022-02-042-6/+7
| | | | | | | | | | 1. Adds explicit to new constructor 2. Adds an empty destructor for consistency to new class 3. Moved new data member into private class. Pick-to: 6.3 Change-Id: Ib76c1cbea214693c929ced8651bdac92c2dbcd4e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix WaylandCompositor PCH build without qtdeclarativeIlya Fedin2022-01-184-0/+8
| | | | | | | | | | | Currently, quick-related headers included in the module header conditionlessly what makes it fail with PCH when Qt is built without qtdeclarative. Fixes: QTBUG-97593 Pick-to: 6.2 6.3 Change-Id: Ida73f3369982594aae9e14160f6966fe57c7e089 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Docs: Fix parentheses for WaylandQuickItem subsurfaceHandler exampleKai Uwe Broulik2021-12-071-2/+3
| | | | | Change-Id: If9a610004ae66f8e829d9e602ab249ee9f527eaa Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Move Q_DECLARE_PUBLIC to the public sectionJani Heikkinen2021-12-031-1/+2
| | | | | | | | | This is now required to use QObjectPrivate::connect. Fixes: QTBUG-98897 Pick-to: 6.2 Change-Id: Ibe98404c6e220da43cd08ab732821c874c39bc18 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Introduce new qt-shell and an API for custom shellsPaul Olav Tvete2021-12-024-12/+109
| | | | | | | | | | | | | | | | | | | | | | Adds a new API for writing custom shell extensions. This API is supported, but semi-public. Binary compatibility is not guaranteed. Also adds qt-shell, a new shell that maps directly to the QWindow API, and provides functionality that Qt provides on other window systems, such as absolute window positions and window activation. This shell is not intended for use on the desktop. This is a squashed commit of a development branch consisting of approximately 60 changes. Contributors: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Paul Olav Tvete <paul.tvete@qt.io> Task-number: QTBUG-94330 Task-number: QTBUG-91542 Change-Id: I419b6bd8179fe03e4da47d328c7ff4b4795b8a91 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Support text-input-unstable-v4-wipInho Lee2021-11-198-4/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature can be enabled by -feature-wayland-text-input-v4-wip. It is disabled by default. TextInputManagerV4 is available in a compositor. zwp_text_input_v4 is available for QT_WAYLAND_TEXT_INPUT_PROTOCOL in a client It supports Hangul(Korean) with a qtvirtualkeyboard patchset (refs/changes/02/357902/3) It includes some workarounds for ibus because each ibus module has its own policy for focus-in/focus-out. enter/leave will synchronize with enable/disable and they will happen whenever focus-in/focus-out happen. Cursor/anchor positions are byte offsets. Surrounding text will be trimmed when it is over 4000 byte. For debugging, uses "qt.waylandcompositor.textinput" in a compositor side uses "qt.qpa.wayland.textinput" in a client side Tested on qtvirtualkeyboard and ibus TODO : * QTBUG-97248 - event:preedit_commit_mode is not implemented yet. Current preedit_commit_mode is 'commit'. * request:set_text_change_cause is not implemented. Task-number: QTBUG-94327 Change-Id: I72644893f40f30c4b03cd6a7d05483d12bde1070 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Support different text input protocolsLiang Qi2021-10-075-11/+50
| | | | | | | | | | | | | | | | | | | from clients and one compositor at same time. For compositor side, just need to have TextInputManager and QtTextInputMethodManager together. For client side, set QT_WAYLAND_TEXT_INPUT_PROTOCOL env to choose: * If the env is unset(empty) or invalid, it will search qt_text_input_method_v1 and zwp_text_input_v2 in order * Set as "qt_text_input_method_v1" or "zwp_text_input_v2" if compositor supports * Set as "zwp_text_input_v2;qt_text_input_method_v1" Change-Id: Ieec293ff412bf2d3e5ca9c69a951bfe1899cc808 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Keep reference to buffer until it has been replacedEskil Abrahamsen Blomfeldt2021-08-242-22/+32
| | | | | | | | | | | | | | | | | | For the code path which uses QWaylandBufferMaterial, the buffer could potentially be deleted before the material had been updated, which could cause issues if the render thread was currently using the textures. In the default code path this was handled by keeping a reference to the buffer in the texture provider, but in the alternative YUV format code path, we did not increase the reference count of the buffer, so it would be deleted immediately when it was replaced rather than wait for the sync with the render thread. Pick-to: 5.15 6.1 6.2 Task-number: QTBUG-95715 Change-Id: Ic6038ea8281e2a2e292d12150d1fffedb5c3b76e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Implement wp_viewporter support for video buffer formatsEskil Abrahamsen Blomfeldt2021-08-231-1/+11
| | | | | | | | | | | | | | | | | | Some EGL image formats (the YUV formats specifically) cannot be handled by the built-in node types in the Qt Quick scene graph and use a custom material and geometry setup. In this setup, the wp_viewporter source rectangle was ignored and the entire texture was always sampled. This caused problems e.g. for video frames supplied by GStreamer. [ChangeLog][Extensions] Support for wp_viewporter extended to cover less common buffer formats. Pick-to: 5.15 6.1 6.2 Task-number: QTBUG-95464 Change-Id: I2504c6cd7d82e17d28e930a59d9ec71b25779acb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* QWaylandQuickItem: Invoke handleSubsurfaceAdded also with QVariantKai Uwe Broulik2021-08-101-0/+4
| | | | | | | | | | | | | | | | Docs for WaylandQuickItem subsurfaceHandler suggest you use it like so: subsurfaceHandler: QtObject { function handleSubsurfaceAdded(child) { ... } } However, as far as C++ is concerned all arguments of a JavaScript function are QVariant, so the type-specific invocation fails. Change-Id: I2d1a32bef5b30099cf34edc8a9e50b42fb26f217 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Delete texture resource immediately to prevent race on shutdownRobert Griebl2021-08-041-2/+1
| | | | | | | | | | | | | | Calling deleteLater on the SG texture leads to a race condition when shutting down the compositor: the deleteLater handler is called after the global RHI shutdown, leading to crashes in the render thread and/or debug outputs complaining about leaked texture resources. Fixes: QTBUG-95394 Pick-to: 6.2 Change-Id: I19525507597e2ecdb534e57406b4fe1d34fcf4de Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Cleanup up all subsurface QQuickItems correctlyDominik Holland2021-08-021-0/+1
| | | | | | | | | | | | | | | | | When showing a surface with a subsurface in a QML based compositor, the subsurface QQuickitems are now destroyed when when main surface QQuickItem is destroyed and not just when the surface is destroyed. This prevents subsurface QQuickItems piling up when showing and hiding the client surfaces e.g. inside a StackView. Fixes: QTBUG-94602 Pick-to: 5.12 Pick-to: 5.15 Pick-to: 6.1 Pick-to: 6.2 Change-Id: I006a6a763d4daf560ba2a7b6f83e1de3e3c48906 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Remove forward declaration for classes that don't exist anymoreAlbert Astals Cid2021-06-183-3/+0
| | | | | | Change-Id: I06bd8056a9892d0affe92ddc262def9d42a471fa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: Fix undocumented parameter in QWaylandCompositor::seatFor()Topi Reinio2021-06-071-1/+1
| | | | | | Task-number: QTBUG-91875 Change-Id: I1d1a16309ceacda0f95123895574664c2465008f Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Enhance QWaylandQuickHardwareLayer supportElvis Lee2021-05-312-3/+11
| | | | | | | | | 1. method to re-enable scenegraph painting 2. method to initialize in native level Change-Id: Ia680c25d327608fd9163b46f3d1051d44dc759a8 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>