summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.5' in qt/qtwaylandv6.5.0-beta1Qt Submodule Update Bot2022-12-161-2/+2
| | | | | Change-Id: I6c233f44a3d90b845612235ee5860a695c459f2a Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtwaylandQt Submodule Update Bot2022-12-141-1/+1
| | | | | Change-Id: I597160ecff3a28f21b15d3960d5a56304603ae4e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtwaylandQt Submodule Update Bot2022-12-131-2/+2
| | | | | Change-Id: I5b820e9fe69379c19d3f3ba94fbcffbc23092bd5 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add WL_SHM_FORMAT_RGB888 to supported shm formatsThomas Senyk2022-12-132-1/+9
| | | | | | | | | | | In addition a new entry in QWaylandCompositor::ShmFormat allows compositors to enable that format at runtime Change-Id: I0f894adb3f688458a65713e343127fbcb26f8b65 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit ff445c2c7c93a64922ae437cbbdc95542360c7ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Client: Handle zwp_primary_selection_device_manager_v1 global removalVlad Zahorodnii2022-12-132-5/+9
| | | | | | | | | | | | The zwp_primary_selection_device_manager_v1 global can be withdrawn if the compositor disables the primary selection, i.e. middle click to paste selected text. QtWayland needs to handle that; otherwise the app can crash. Change-Id: Idbb4db18b605f85a5951fa12c1bdf61898b0d123 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 45163234a4e4baad0012d3ee07501093d98ba91c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-12-121-2/+2
| | | | | Change-Id: Iede8e1c96d9f5fb35d2dc887d77b30084c1ba0dd Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-12-111-2/+2
| | | | | Change-Id: I27ff5734353528fd8be07a6d4cd6d916c0b45f91 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* compositor: fix build without quickLiang Qi2022-12-095-0/+21
| | | | | Change-Id: Ic9ff039028e509c3e09d446f85648fe063f4749f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-12-081-2/+2
| | | | | Change-Id: I5148257b05bb7f8efe47580a64c129f07e28a7c6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Client: Provide support for custom shellsVlad Zahorodnii2022-12-083-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, an application can use only one shell surface protocol at a time. However, there are applications that need to use more than one shell surface protocol, e.g. xdg-shell + layer-shell. layer-shell can be used for the desktop background window, and xdg-shell for popups, etc. This change introduces an API in QWaylandWindow that allows specifying the shell integration per window. Custom shell code needs to call QWaylandWindow::setShellIntegration() while the window is unmapped. By default, QWaylandWindow will use QWaylandDisplay's shell integration plugin. This change should be source compatible with existing shell integration plugins deployed in the wild. If the custom shell wants to track additional state for the window, it should do it using its own means. Perhaps we could improve this in the future releases of Qt. [ChangeLog][QtWaylandClient] It is possible to run Qt applications using more than one shell surface protocol, e.g. xdg-shell + layer-shell. Change-Id: Id0458b32af623f114c06d51d0d21ad06efd69328 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* client: Implement QNativeInterface::Private::QWaylandWindowDavid Redondo2022-12-0812-7/+50
| | | | | | | Task-number: QTBUG-94729 Change-Id: Ib79f3199a4518700aa032c5ca4760a2b53c401e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Implement fractional_scale_v1 and wp_viewportDavid Edmundson2022-12-0722-7/+723
| | | | | | | | | | | | | This allows compositors to hint a non-integer scale to use on a window which we can hook to Qt's existing fractional scaling support. The viewport is used to communicate the relationship between buffer size and logical size to the compositor. It is a non-integer alternative to wl_buffer_scale Change-Id: I1a850f1bcd40e8d04e241e18a538b11f18bc671c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* compositor: Support touch interaction with client decorationsEskil Abrahamsen Blomfeldt2022-12-072-13/+33
| | | | | | | | | | | | | | | | | | | | The client tells us when the title bar has been pressed and it has started a move, but we only actually updated the position of the window for mouse events. This adds touch event support for this, but only for a single touch point. Since there is no way of knowing which touch point actually triggered the move, we just assume it is the first. This could cause some odd behavior if you try interacting with the window frame with two fingers at the same time, but not beyond what you would expect. [ChangeLog][QtWaylandCompositor] It is now possible to move windows using client-side decorations with touch input as well as mouse input. Fixes: QTBUG-108690 Change-Id: I23ce1e39a26be5b1b5a5ac93d8f38cc59685aa96 Reviewed-by: Paul Olav Tvete <paul.tvete@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>
* Mark the module free of qAsConst()Marc Mutz2022-12-051-0/+1
| | | | | Change-Id: I914ccc09297ac6283d7cf24d5afc96ebdaf294d0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-12-051-2/+2
| | | | | Change-Id: Ibb1917502b7792eac1e1b84e8488da5096129a20 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Client: Improve handling of 0xH and Wx0 xdg_toplevel configure eventsVlad Zahorodnii2022-12-054-9/+59
| | | | | | | | | The compositor can send a configure event with 0xH and Wx0 when it wants the window to have some concrete size along one dimension but wants the client to pick the size along the other dimension. Change-Id: I2e72017d4a71b19a930da24fa5c58b6ce672fb94 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Allow resizing with touch input on client-side decorationsEskil Abrahamsen Blomfeldt2022-12-051-37/+80
| | | | | | | | | | | | | | | | | | The touch input for client-side decorations had its own handling which only processed button clicks and moves. This meant that it was impossible to resize windows using touch events. This generalizes the mouse input code path and uses it for touch as well. We need to take care not to update any mouse state in the case of touch, since we only care about touch press events, so we pass in a PointerType and disable parts of the code path when the input is from a touch device. [ChangeLog][QtWaylandClient] Enable resizing windows using client-side decorations with touch input as well as mouse input. Task-number: QTBUG-108690 Change-Id: I761ebb0c7c4844c52f793caa74e8606d1593757f Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Fix frame sync related to unprotected multithread accessWeng Xuetian2022-12-032-32/+43
| | | | | | | | | | | | | | There is a few crashes happens in real life that frame callback is double-free'd and hit an assertion in wayland-client. e.g. https://bugs.kde.org/show_bug.cgi?id=450003 This is due to the WaylandEventThread and calls to QWaylandWindow::reset may free and unset the mFrameCallback at the same time. mFrameSyncMutex should be used to protect such access. Pick-to: 6.4 Change-Id: Ie01d08d07a2f10f70606ed1935caac09cb4f0382 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Honor QGuiApplication::overrideCursor()Vlad Zahorodnii2022-11-301-1/+4
| | | | | | | | | | | If there's a QGuiApplication::overrideCursor(), QWindow::cursor() can still return a different cursor. This can result in a wrong cursor when the pointer enters a window. Pick-to: 6.4 6.2 5.15 Fixes: QTBUG-75919 Change-Id: I015117b4b6d252b421ab14bd8f2a8f582f7cae52 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-291-1/+1
| | | | | Change-Id: Idd122988e3156f7e244875d0002e5ede2d307972 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-261-2/+2
| | | | | Change-Id: I24645a84eec8e13f726f4c608fed299bc701b8e5 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-251-2/+2
| | | | | Change-Id: Ia7a92020b3793006197088ddbba06a7a1a61e952 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Improve examplesBernd Weimer2022-11-2523-104/+124
| | | | | | | | | Updated signal handlers to new syntax to reduce noise (warnings). Allowed to build examples with subfolders in one step, updated from deprecated WlShell to XdgShell, etc. Change-Id: If821363ffd1b38ea1d152f5a044b0609cf739014 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Client: Bump wl_output versionVlad Zahorodnii2022-11-221-1/+1
| | | | | | | wl_output_release is available starting with wl_output v3. Change-Id: I21822b26728ffb9318f1f8b4bd82ef7329682838 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Call wl_output_release() upon QWaylandScreen destructionVlad Zahorodnii2022-11-221-0/+2
| | | | | | | It ensures that the proxy gets destroyed. Change-Id: I915cc8814e33dd3b0405b2bf82bd12ce6b5f785b Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Add F_SEAL_SHRINK seal to shm backing fileVlad Zahorodnii2022-11-181-1/+7
| | | | | | | | | | This lets libwayland-server avoid installing a SIGBUS handler when it wants to mmap() the backing file and access the contents of shared memory client buffers. Change-Id: Id0b17f729799535d73e8700c5a99c32fd88a068a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-171-2/+2
| | | | | Change-Id: Ie3930d1958c3ee7059f74b6c02162766aab49f13 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-161-2/+2
| | | | | Change-Id: Iaf6a7d987600d1117d0ad5f7b9d289ba249cc386 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-141-2/+2
| | | | | Change-Id: Ie3ed92833842dc97f31dea806cddd45732d3b604 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Test: update MockClientInho Lee2022-11-102-1/+15
| | | | | | | | | add name and description functions in order to suppress warnings. This amends f1e71327d462d2dae0b46677bbc478afb0d1b2f7 . Change-Id: I0f638802773ce3da4574683e0783ec7405e7c0dc Reviewed-by: Liang Qi <liang.qi@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-091-2/+2
| | | | | Change-Id: I79f1e4fe263b2b5cd03f70565632a4ea6cfaddc8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* tests: fix tst_seatv4 to use 24 as default cursor sizeLiang Qi2022-11-082-3/+10
| | | | | | | | | | | | Also set default cursor size to 24 for client, which is correct both on KDE and GNOME at least. Fixes: QTBUG-104259 Pick-to: 6.4 6.2 5.15 Change-Id: Ie4ba27695974025b093a86d8c96fb23d25ad23f7 Reviewed-by: Inho Lee <inho.lee@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove uneeded forceRoundTrip on XdgOutputManagerDavid Edmundson2022-11-081-1/+0
| | | | | | | | | | In the first rountrip we will get all wl_outputs and the xdg_output_manager. Therefore we know we will have called wl_output.bind and xdg_output_manager_get_output by the time we hit the second roundtrip on startup. Change-Id: I69f911c13f9bcdfb59b04eceea4bcca778e7755c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-081-2/+2
| | | | | Change-Id: Id7345d7557b9782019e42726589ad96896468ff4 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add dependencies of wayland protocolsInho Lee2022-11-072-0/+6
| | | | | | | | Some macros are missing DEPENDS for add_custom_commands Fixes: QTBUG-108142 Change-Id: Ifacb2ea9bf3003c10dd407a8c77fc06b893b6a65 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-031-2/+2
| | | | | Change-Id: I182859e0a91d36f19c576676de419ec968c16d2c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Implement QNativeInterface::Private::QWaylandScreenDavid Redondo2022-11-031-2/+9
| | | | | | Change-Id: I2f5cc638f33fe0d884146342516efa7ce8474478 Task-number: QTBUG-94729 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Always use blocking write for data_source.sendInho Lee2022-11-011-0/+8
| | | | | | | | | | | | | QtWaylandClient assumes that data_source's fd is BLOCKING, but some compositors (e.g. mutter) pass an fd with O_NONBLOCK set. In this case, 'write' is not guaranteed to process all of the passed data in one call. Instead of dealing with such partial writes, remove O_NONBLOCK. Fixes: QTBUG-107076 Pick-to: 6.4 6.2 5.15 Change-Id: Ieb446da9fdfbaaa55100f573b396ee449cadc463 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-11-011-2/+2
| | | | | Change-Id: I89f98e73aea975dfd23f7a9c88089dd4f2d38526 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Disable/fix warningsJonas Karlsson2022-10-284-2/+9
| | | | | | | | missing-field-initializers and unused variable Change-Id: I1a5ceaf53ec706786c73eecab0c002fa9153b962 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Enable syncqt cppAlexey Edelev2022-10-271-0/+2
| | | | | | Change-Id: Ie9b681ebb229596d8ece1bb8577b0fcba87b2c88 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Implement QNativeInterface::QWaylandApplicationDavid Redondo2022-10-272-4/+71
| | | | | | | Task-number: QTBUG-94729 Change-Id: I84f080719c6364137368bdd1759947a6d6ef2e5b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Add support for xdg_toplevel.configure_boundsVlad Zahorodnii2022-10-263-22/+162
| | | | | | | | | | | | | | Currently, QtWayland doesn't know about work area size, which can create a problem where some windows don't fit into the screen area or work area. With the xdg_toplevel.configure_bounds event, the compositor can indicate the client the recommended maximum window geometry size. https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/41 Change-Id: I5214aba9f144d091a2afe639de94b8d717c42fdc Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Add support for high-resolution scrollingVlad Zahorodnii2022-10-269-61/+409
| | | | | | | | | | | | | | | With wl_pointer version 8, the axis_discrete event is replaced with the axis_value120 event. The main difference between axis_discrete and axis_value120 is that the latter carries scroll deltas that can be fractions of 120, e.g. 30, etc. See also https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/72 Change-Id: I4f724ead7ba146dde6d8975fa4edfcfca761769d Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-10-261-2/+2
| | | | | Change-Id: I0b5da7226238f8319d535f979e6ef97cf23f173f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Implement window alert with xdg-activationIlya Fedin2022-10-237-4/+52
| | | | | | | | | | This is implemented by not specifying serial, as mentioned in https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/9#note_854977 Tested on KDE Plasma Change-Id: I4ef0975040bbce581b615b0318f90601e080235c Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Port to new Q_UNREACHABLE_RETURN()Marc Mutz2022-10-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator to convert sequences of Q_UNREACHABLE() + return into Q_UNREACHABLE_RETURN(), newly added to qtbase. const std::string unr = "unr", val = "val", ret = "ret"; auto makeUnreachableReturn = cat("Q_UNREACHABLE_RETURN(", ifBound(val, cat(node(val)), cat("")), ")"); auto ignoringSwitchCases = [](auto stmt) { return anyOf(stmt, switchCase(subStmt(stmt))); }; makeRule(stmt(ignoringSwitchCases(stmt(isExpandedFromMacro("Q_UNREACHABLE")).bind(unr)), nextStmt(returnStmt(optionally(hasReturnValue(expr().bind(val)))).bind(ret))), {changeTo(node(unr), cat(makeUnreachableReturn, ";")), // TODO: why is the ; lost w/o this? changeTo(node(ret), cat(""))}, cat("use ", makeUnreachableReturn)); a.k.a qt-use-unreachable-return. subStmt() and nextStmt() are non-standard matchers. Change-Id: I3855b2dc8523db1ea860f72ad9818738162495c6 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Update dependencies on 'dev' in qt/qtwaylandQt Submodule Update Bot2022-10-191-2/+2
| | | | | Change-Id: I210fbfdfee907389ff8088efe5b76f79f1c20b85 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>