summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Client: Check for shell integration when initializing platform pluginIlya Fedin2023-04-038-19/+31
| | | | | | | | | | | | | | This makes QWaylandDisplay::initialize return a boolean and moves the QWaylandIntegration's failure check out of constructor as QWaylandIntegration::shellIntegration is a virtual method, this also removes the out-of-date comments about processEvents as it's no more used in QWaylandDisplay::forceRoundTrip. Fixes: QTBUG-102457 Pick-to: 6.5 Change-Id: I3c8f1d9fd195326b587b45318443c2beee1ebfc2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: let QWaylandClientExtension work before platform integration is assignedIlya Fedin2023-04-033-8/+10
| | | | | | | Task-number: QTBUG-102457 Pick-to: 6.5 Change-Id: Ia47478a4fbf45ba96fd73c6a1a53c2b844aa41b4 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* doc: Correct outdated info about text input methodsEskil Abrahamsen Blomfeldt2023-04-031-10/+8
| | | | | | | | | | | The fancy-compositor now supports multiple text input methods at the same time, but the documentation had not been updated to reflect this. Pick-to: 6.5 Fixes: QTBUG-110924 Change-Id: I0c23f06db7eefec6442eff50f75d0f78ba2203d3 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Provide hooks for parent windows to attach popups to themVlad Zahorodnii2023-04-032-0/+7
| | | | | | | | | | | | | | | | | | | | | | | The xdg-shell protocol allows to attach xdg_popups to parent surfaces that are not xdg_surfaces. For example, in order to attach an xdg_popup to a layer_surface, you would need to initialize the popup as follows xdg_popup popup = xdg_surface.get_popup(nil, positioner) zwlr_layer_surface_v1.get_popup(popup) QWaylandShellSurface::attachPopup() provides a way to perform parent-specific initialization, i.e. call zwlr_layer_surface_v1.get_popup. QWaylandShellSurface::detachPopup() was added mostly for futureproofing. The xdg-shell doesn't say exactly how the parent surface must be attached. In the example provided above, a request is used to associate the popup with its parent layer surface. But one could also create an object to represent the relationship between the two. The detachPopup() hook can be used to call the destructor request for that object. Change-Id: I43b10e77bd70751d8b4c3a0b5e1d294690bc471a Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Track parent-popup relationship in QWaylandWindowVlad Zahorodnii2023-04-033-14/+27
| | | | | | | | | | | | | | | | | | This reduces the amount of boilerplate code that goes in shell integration plugins providing popups. The main motivation behind this change though is to ensure that QWaylandWindow::addChildPopup() gets called outside the QWaylandShellSurface constructor so one could use the popup's shell surface object to customize parent-child relationship. mShellSurface = mShellIntegration->createShellSurface(this); when this code executes, addChildPopup() will be called before the return value of createShellSurface() is assigned to mShellSurface. Change-Id: I9ccfb21f46febb451bdd7b4aa7851a99f3a03655 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Cleanup vulkan surfaces on hideDavid Edmundson2023-03-312-5/+13
| | | | | | | | | | | Otherwise a hide/show combination will result in use of wl_surface after it has been destroyed by QWaylandWindow. This closely matches what the pattern we use for QWaylandEGLWindow. Pick-to: 6.5 Change-Id: Ic23f947046ce521125dfa8a3c22f5529dfcbece2 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>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2023-03-281-2/+2
| | | | | Change-Id: I652e0b22d18540bc89ab15a2b468c0d51adfac47 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add Axivion configMatti Paaso2023-03-231-0/+63
| | | | | | | Task-number: QTQAINFRA-5244 Change-Id: Iaec5010ba4eb58123275a352d637c83a0c57ee4a Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* Client: Fix the mouse being stuck in pressed state after DnDIlya Fedin2023-03-211-1/+1
| | | | | | | | | | | | | | I can still reproduce the problem using QtWidgets applications on KDE Plasma 5.27. Both Windows and macOS QPA have a similar quirk and they both send a MouseButtonRelease event rather than a MouseMove event. Amends f7a386eeaec8e6314c1be7de5e14e9fe3847f9ba Task-number: QTBUG-97037 Pick-to: 6.5 6.2 5.15 Change-Id: I864a1cb68b3660d858623f943b3958f7cafbf955 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Fix wl_surface destruction orderVlad Zahorodnii2023-03-201-6/+6
| | | | | | | | | | | | | | The main thread can attempt to close the window while the QtQuick render thread is still busy. If that happens, ensure that QtQuick render thread has finished rendering and presented the last frame before destroying the wp_viewport and any other associated surface extensions so the window destruction looks more reasonable. Pick-to: 6.5 Change-Id: I8d2a3372fe6de51f357eed513baaa34a148470e3 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2023-03-201-2/+2
| | | | | Change-Id: I054d6f76480ac263d0c5efe16fdc98bab195e1d4 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* 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>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2023-03-111-2/+2
| | | | | Change-Id: I21d9fe900c44b75a4d48e5d010bbe9051ccf2a7f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* client: Add support for xdg_popup_configureLiang Qi2023-03-103-2/+49
| | | | | | | | | | | | | | | | | This amends 59a5fe99e1569421b920d99c5b20cdafcdcf43a9. Since set_constraint_adjustment() was supported, popup should reposition itself from configure. Need to find a way to test clientSideMargins() and etc in the future. Fixes: QTBUG-110623 Task-number: QTBUG-87303 Pick-to: 5.15 6.2 6.4 6.5 Done-with: Ilya Fedin <fedin-ilja2010@ya.ru> Change-Id: I734acfcde3ba5a35b6f4222358bc93e49fa43f7c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Rename tst_reconnect to avoid clash with qtremoteobjectsEdward Welbourne2023-03-101-3/+3
| | | | | | | | Name is too generic, but I'll leave this module's maintainers to work out what to do about that. Left the source file with the old name. Change-Id: I0429f03ef06feeae95c2f72ac76cc75397051d9e Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Introduce path for surviving compositor restartsDavid Edmundson2023-03-0720-29/+648
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces an optional mechanism for clients to survive a crash and reconnect seemingly seamlessly. In the event of a disconnect from the compositor socket we simply try to reconnect again and replay any data needed so that we maintain a consistent state to where we left off. From an application point-of-view any open popups will be dismissed and we we potentially get a new framecallback, but it will be almost entirely transparent. Users of custom QWaylandClientExtensions will be notified via the activeChanged signal and rebuild as though the compositor had withdrawn and re-announced the global. OpenGL contexts will be marked as invalid, and handled the same way as a GPU reset. On the next frame RHI will notice these are invalid and recreate them, only now against a new wl_display and new EGLDisplay. Users of low level EGL/native objects might be affected, but the alternative at this point is being closed anyway. The entire codepath is only activated via an environment variable. Change-Id: I6c4acc885540e14cead7640794df86dd974fef4f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Compile with -no-openglEskil Abrahamsen Blomfeldt2023-03-0610-10/+5
| | | | | | | | | | | A few of the tests were including Qt OpenGL for no good reason, and the link step should be optional. Pick-to: 6.2 6.5 6.5.0 Fixes: QTBUG-110420 Change-Id: Icb78c15e49070c6938bf9bb75abfed677af6785b Reviewed-by: Inho Lee <inho.lee@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Do not cast placeholder screens to QWaylandScreenAleix Pol2023-03-061-1/+1
| | | | | | | | | | It's wrong to C-cast an object to a class that isn't theirs. Check if it is a placeholder first. Pick-to: 5.15 6.2 6.5 Change-Id: I45d3c423422ae6638a033fb0f4cfefc7cd4460f0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Rename pure-qml to fancy-compositorEskil Abrahamsen Blomfeldt2023-03-0616-52/+52
| | | | | | | | | | | | | | | The pure-qml name made sense when the example was made, but since then we have added a lot of examples that are all in Pure QML. Minimal QML covers the basics of how to set up a compositor in QML, but Pure QML shows a more advanced use case, with animations, windowing system features, virtual keyboard support, etc. To make it clear what the example is demonstrating, we call it Fancy Compositor instead. Task-number: QTBUG-110993 Change-Id: Iad1cfb11b6461858ebcdaa388ed16e1fd3ec8805 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2023-03-021-2/+2
| | | | | Change-Id: I15d57ef0e0bcc37ac7d0e9b298ff7c1741a20c60 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Suppress QSharedMemory deprecation warningsMårten Nordheim2023-03-022-3/+5
| | | | | | | | | | | Since some consumers/producers may be using the old API we will use that and suppress the warnings. Reverts 904b9d33dc0ac97b01c811f0bcb8f67f824b052b Change-Id: Ia59fcb241ca991b8f096a07de4946c49f7997d72 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Client: Allow runtime disabling of interfaces for debugging purposesDavid Edmundson2023-03-021-0/+5
| | | | | | | | | | | | | | When running it's useful to confirm things work correctly in various configurations. In particular testing how things behave without server side decorations is important on all changes. It's easier to make the client pretend the compositor didn't send anything than change the compositor every time. This also potentially makes unit tests simpler than having to change the mock compositor setup. Change-Id: Ide897d918384389009aa38c7030d5ac30fc837a6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* client: Cleanup CSD contentFBO on surface hideDavid Edmundson2023-03-021-0/+2
| | | | | | | | | | | Otherwise we're wasting a large amount of memory. It will be recreated on the next show. This is also needed for handling compositor reset support where the framebuffer needs recreating. Change-Id: Ia684266f6f7998b0d62d177faf182efdfeaa0f06 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Revamp/document custom-extension exampleEskil Abrahamsen Blomfeldt2023-03-0216-61/+273
| | | | | | | | | | | | | | | This is a very useful example which was unfortunately undocumented. It also needed some clean-up in the code, and as part of writing the documentation, it became clear that it would be an easier demonstration to follow if the QML client was more similar to the C++ client, so that they were simply two implementations of the same spec. Fixes: QTBUG-110919 Change-Id: Ia4476cda34056e28722af6639f95d8c87819681a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Port xdg shell plugin towards QWaylandShellIntegrationTemplateDavid Redondo2023-03-014-38/+46
| | | | | | | | | | | Ports manual initialization to the automatic handling of the template. For now the integration QWaylandXdgShellIntegration and QWaylandXdgShell are still separate but could be merged in a future step. Change-Id: I73bb9674e62f24f403349784e1b1e52a39aa8e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Port ivishell integration to QWaylandShellIntegrationTemplateDavid Redondo2023-03-012-19/+20
| | | | | | | | Use ivi_application as the principal global and use QWaylandClientExtensionTemplate to manage ivi_controller. Change-Id: I172c14d3b79e875842459c36e4e191ed5287eadc Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Port wlshell integration to QWaylandShellIntegrationTemplateDavid Redondo2023-03-012-21/+6
| | | | | Change-Id: Ib05a4645f930f41819447f6e1d562753a36e5710 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Port fullscreenshell integration to QWaylandShellIntegrationTemplateDavid Redondo2023-03-012-20/+14
| | | | | Change-Id: Ia3271a312d857d7e864444ad77e8e18a4a3858bf Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Unify margins handlingIlya Fedin2023-02-283-38/+24
| | | | | | | | | | | | | | | | | | | | | | Currently all the shell integrations except of xdg-shell pass full surface size to resizeFromApplyConfigure. xdg-shell behavior is not even consistent between the first and the consequent calls to resizeFromApplyConfigure. This replaces QWaylandWindow::customMargins with QWaylandWindow::windowContentMargins in order to being able to retrieve set_window_geometry margins separately from the geometry itself and makes xdg-shell passing the geometry consistently as full surface size removing the need in special casing. This also makes QWaylandWindow::clientSizeMargins public so e.g. xdg-shell can compute out absolute position for window content geometry without special casing decorations Pick-to: 6.5 Change-Id: I1b98afc8b5c867ecb7cc586267b13f7ec4b1a88c Reviewed-by: David Edmundson <davidedmundson@kde.org>
* doc: Add missing documentation screenshotsEskil Abrahamsen Blomfeldt2023-02-286-0/+6
| | | | | | | | | | | A few examples were missing screenshots. Having something visual makes it a lot easier to understand the example without having to compile and run it. Pick-to: 6.5 Task-number: QTBUG-110993 Change-Id: I2c95262f79a94a5da12421e9c19e42ff73a178c0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Client: Remove flip popup constraintsVlad Zahorodnii2023-02-281-3/+1
| | | | | | | | | | | | | | | | xdg_positioner doesn't have good anchor rect and other needed information so the compositor can properly flip popups. In some windows I see that some popups are flipped in such a way that the popups look "detached" from the parent window. With the information that QtWayland provides so far only slide constraint adjustments can produce somewhat expected results. Although there will be still some issues near screen edges. Pick-to: 6.5 6.4 6.2 5.15 Task-number: QTBUG-87303 Change-Id: I4021f497b78e62651fe606c4be21a387a92edd6c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Client: Update last input device on tablet tool tapVlad Zahorodnii2023-02-283-4/+17
| | | | | | | | | | | | When user uses tablet exclusively to navigate in an app, the last tracked input device will be null. As the result, any popup that requires a popup grab will be backed by an xdg-toplevel rather than an xdg-popup. Fixes: QTBUG-111130 Change-Id: Ib87e732603bbe111c584361357727171825f8c68 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* doc: Add compositor examples to Embedded categoryEskil Abrahamsen Blomfeldt2023-02-2810-0/+10
| | | | | | | | | | | Qt Wayland Compositor API is perfectly suitable for desktop as well, but is primarily used on embedded systems and that is where the ability to build your own platform, including a custom compositor, yields the most power. Pick-to: 6.5 Change-Id: Icb5827b29f896cf6835bdd37fb003a4abbef9f94 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* doc: Remove category from examples docsEskil Abrahamsen Blomfeldt2023-02-2819-51/+44
| | | | | | | | | | | | | | 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>
* client: Utilize new handleWindowDevicePixelRatioChangedDavid Edmundson2023-02-271-1/+7
| | | | | | | | | | | | | Rather than assuming window scale should match the screen scale use an explicit notification system. This fixes issues caused by drift between the two: Task-number: QTBUG-101656 Task-number: QTBUG-93380 Change-Id: I9edb5fd95b8ceeca8073db1f56d81a31bbc9c549 Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* client: Force a roundtrip when an XdgOutput is not ready yetMarco Martin2023-02-274-0/+42
| | | | | | | | | | | | Is possible that the server sends a surface_enter before all the information of the XdgOutput have been processed by the client. in this case the associated QScreen doesn't exist yet, causing a QWindow::SetScreen(nullptr), which will fall back to QGuiApplication::primaryScreen(), having the QWindow being assigned the wrong screen Change-Id: I923d5d3a35484deafa6f0572f79c16c27b1f87f0 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Move setup functions from local to memberThomas Senyk2023-02-272-5/+7
| | | | | | | | | | | | | | Two functions with the same name and signiture were committed in two files. Normally this isn't an issue as those symbols end up in different plugins, however for a static Qt build all are linked into the same binary => symbol clash! Changing those functions to member functions of the respective private classes resolves this issue. As the original name was rather long, it was also shorted in the process. Fixes: QTBUG-111473 Pick-to: 6.5 Change-Id: I0f341a64199637a415898309763f9b5416fc4be1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix build on CentOS 7Ilya Fedin2023-02-241-0/+10
| | | | | | | | | | | | | | | | | | Have the following errors while attempting to build qtwayland v6.5.0-beta3: /usr/src/Libraries/qt_6.5.0/qtwayland/src/client/qwaylandshmbackingstore.cpp:48:19: error: 'F_ADD_SEALS' was not declared in this scope 48 | fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); | ^~~~~~~~~~~ /usr/src/Libraries/qt_6.5.0/qtwayland/src/client/qwaylandshmbackingstore.cpp:48:32: error: 'F_SEAL_SHRINK' was not declared in this scope 48 | fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); | ^~~~~~~~~~~~~ /usr/src/Libraries/qt_6.5.0/qtwayland/src/client/qwaylandshmbackingstore.cpp:48:48: error: 'F_SEAL_SEAL' was not declared in this scope 48 | fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); | ^~~~~~~~~~~ Pick-to: 6.5 Change-Id: I4b9b3a13ac47483594f454ba36dc5d720cb592a5 Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2023-02-241-2/+2
| | | | | Change-Id: If3db312603568566183fa7c7a255518f6ab3bd7b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Client: Stop requesting activation on every focus object changeVlad Zahorodnii2023-02-221-13/+0
| | | | | | | | | | | | | | | | | | | | | | Currently, windows with xdg-toplevel surface role request window activation every time the focus object changes. It conflicts with the compositor's activation and stacking order policies. For example, when a window is minimized, the compositor will start an animation and move focus to the next window. If that window activates itself, it can be raised in the stack and start covering the minimized window, thus making it look as if no animation is played at all. This activation logic was introduced as part of qt-shell activation model in d89c8920f3b82dd2098971b5a66c4b9c75da5af0. On the other hand, with the introduction of the xdg-activation-v1 protocol, there is a better way to pass input focus, so drop the qt-shell hack in favor of that. Fixes: QTBUG-111377 Pick-to: 6.5 Change-Id: I8ed19f1be17f49fa9748b1cb5fdd0070791d2ecd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Convert cursor bitmap to supported formatMichael Weghorn2023-02-221-1/+15
| | | | | | | | | | | | | The 1-bit image formats QImage::Format_Mono and QImage::Format_MonoLSB used by cursor bitmaps don't have a corresponding wl_shm_format. Therefore, convert to a supported image format as necessary to make such bitmap cursors work on Wayland as well. Fixes: QTBUG-95434 Change-Id: I402fd870b301ddc01075251b66f2cf7cc1923133 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix automoc warning regarding includeMårten Nordheim2023-02-211-1/+1
| | | | | | | | | | | There's no Q_OBJECT etc. in the .cpp file, so likely it was removed, or it was intended to include the moc file for the sake of the header. But moc-file for the header has another naming scheme. Pick-to: 6.5 Change-Id: If1202537a40d746e263fd6e6f67e316a2cdb109e Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QOpenGLContext re-creation - orphanedTexturesThomas Senyk2023-02-206-13/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The texture clean-up in the HW-integration has two issues when QOpenGLContext is re-created. 1. texture going out-of-date (QOpenGLContext::aboutToBeDestroyed) and still being used/returned to be used 2. QOpenGLContext dies (QOpenGLContext::aboutToBeDestroyed) while an "discarded" QOpenGLTexture (an orphan) isn't deleted yet. (you can't delete a texture past it's ctx's QOpenGLContext::aboutToBeDestroyed) This patch fixes both issues with a helper and a lambda on 3 HW-integration-backends: wayland-egl, wayland-eglstream and linux-dmabuf Fix for 1.: Simple connection to a lambda that deletes the texture and removes them from the set of used textures. Signal is QOpenGLContext::aboutToBeDestroyed Fix for 2.: A function in each backend: deleteSpecificOrphanedTexture(QOpenGLTexture *texture) Also connected/called by QOpenGLContext::aboutToBeDestroyed Deletes the texture (before deleteOrphanedTextures() does it too late) and removes the dead pointer from the orphanage Pick-to: 6.5 Change-Id: Iccce8845bb669df93f1be43cbe9b9d25f7fd5235 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Move server-buffer example to manual testsEskil Abrahamsen Blomfeldt2023-02-1622-8/+4
| | | | | | | | | | | This is undocumented and demonstrates an experimental feature which was never maintained or exercised. It's a nice feature, so we keep the example around for when we get the time to bring it back. Pick-to: 6.5 Task-number: QTBUG-110993 Change-Id: I045cb2ef02a50017a26226c493607100ea0f1b95 Reviewed-by: Inho Lee <inho.lee@qt.io>
* Move hwlayer-compositor example to manual testsEskil Abrahamsen Blomfeldt2023-02-149-2/+1
| | | | | | | | | | | This was never actually listed as part of the examples, and it demonstrates an experimental feature which was never really in use and hasn't been maintained. So lets move the example to manual tests so that it can easily be revived later if we decide it's needed. Change-Id: I5a70701d34d76b4a8d42cf5945341d1f6e37a28b Reviewed-by: Inho Lee <inho.lee@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2023-02-131-2/+2
| | | | | Change-Id: Iece51dd8eb7b330d9da9466501d99ec368b76c3e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Disambiguate Vulkan debug constantsFriedemann Kleint2023-02-133-34/+34
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I4dfef40309a42b8fa662dfa3d99b65d920480aba Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Exclude sources generated by the scanner from CMake Unity (Jumbo) buildsFriedemann Kleint2023-02-131-4/+6
| | | | | | | | | The generated helper function wlRegistryBind() clashes. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ib814d4576c7565b0413ca16bc0bf5e95caa92c33 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove QWindow forward declarations in namespacesFriedemann Kleint2023-02-132-2/+0
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Idc0d0baeef4b92f61ed67d9a850b5ad3422f9146 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>