summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay_p.h
Commit message (Collapse)AuthorAgeFilesLines
* client: Disentangle platform services and windowmanagerintegrationDavid Redondo11 days1-2/+1
| | | | | | | | | The current state was a bit messy with the platform services being the potentially no initialised qt window manager extension wayland object. Change-Id: Id1f911b75d34fcf70594ca7257b79bf431f0643f Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Support multi-key for input context pluginJiDe Zhang2024-03-101-4/+6
| | | | | | | | | | Sync from QPlatformInputContextFactory::requested in 8596998cb025a8338c9403f5ef9db5a23f5cc682 of qtbase to QPlatformInputContextFactory. Fixes: QTBUG-120202 Change-Id: Ib15d8a59c4cb3baaa19355ed5d7c30c87a7a1c16 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* client: Switch qt-toplevel-drag to xdg-toplevel-dragDavid Redondo2024-02-021-5/+7
| | | | | | | | | | | | While no released compositor implemented qt-toplevel-drag it was a valuable to step to prove the protocol and the Qt implementation together with development pre-release versions of KWin. Now that the protocol is standardized we can switch to that version which is functionally identical. Pick-to: 6.6 6.7 Change-Id: I3beefe542cbabeddba4468b5d1fa24fcb05a2e5a Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Fix deletion of new queued shm buffers during reconnectDavid Redondo2024-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | When reconnecting the cleanup of existing buffers is delayed in order to preserve contents and copy them to buffers belonging to the new connection. Due to the order of events it could happen that a new buffer was deleted along with the old ones but still being referenced by a window. During reconnect all QScreens are removed and new ones added for the wl_outputs on the new connection during the initial roundtrips. When the first new QScreen is added all QWindows move form the placeholder screen to it. This can cause for example QWidgets to repaint. At this point the windows are not reinited yet, and the buffer is queued inside the window. Only afterwards the reconnected signal was emitted which would cause deletion of all existing buffers including the newly queued ones. To fix this the signal is moved after the first roundtrip where all globals are announced and new buffers can be created but no new screens have been announced yet. The signal is renamed to be more fit for its new location. Pick-to: 6.7 Pick-to: 6.6 Change-Id: I06be14d235ac342a4b420176aadad3ccf18178fe Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Make sure wayland object destructors are calledDavid Redondo2024-01-171-5/+10
| | | | | | | | | | | Always at least call the generated "interface"_destroy method which does destroy the proxy. For not already wrapped classes a small template is introduced to pass a function that is called in the destructor. Fixes: QTBUG-111576 Change-Id: I373463710764958ddea42ef0f7dc010c427b2ce8 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Don't use Qt keywords in headersKai Uwe Broulik2023-12-181-2/+2
| | | | | | | | | | | | | Unfortunately for many Wayland features applications need to access Qt private headers which will fail if the project is built with QT_NO_KEYWORDS. Ideally, the examples and tests were ported, too, and QT_NO_KEYWORDS enabled in .cmakec.conf. Pick-to: 6.7 Change-Id: I9f988d304bcc8dba4dd84761c41ba3da2473515d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Support TextInput V3 over v4-wipDavid Edmundson2023-12-131-5/+5
| | | | | | | | | | | | | | | | | Support for v4-wip was not added into any desktop linux compositors, nor was it ever enabled into the default Qt client builds for clients or compositor. TextInputV3 has become the most widely deployed. Whilst changes are needed, they do not need to be breaking changes. A second iteration of V3 can add the features we need. This is now in motion upstream. For cases where QtWaylandCompositor is used, the custom Qt text input method is preferred to work with the Qt virtual keyboard. Pick-to: 6.7 Change-Id: I01e2686c67846804c0069f1495952b530547f91c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove redundant static uint32_t QWaylandDisplay::currentTimeMillisec()Edward Welbourne2023-11-271-2/+0
| | | | | | | | | | Fortunately it was unused. Its 32-bit unsigned return type, measuring time in milliseconds, wraps around every 50 days. If Qt Wayland ever does need to know the current time in milliseconds, I can recommend QDateTime::currentMSecsSinceEpoch(). Change-Id: I03e70e3c7060b1e8fb82fc2e151bb187b6598b96 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Fix variable names for QWaylandDisplay::GlobalHolderInho Lee2023-06-301-2/+2
| | | | | | | | | After c4d0e10, wayland-text-input-v4-wip was broken. In addition, mTextInputManagerv2 will be changed to textInputManagerv2 as other protocols. Change-Id: I5476a1bba579ef1d915959b3c3881cf80a56587d Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Move wayland globals into a holding structDavid Redondo2023-06-131-39/+96
| | | | | | | | | This way all globals get automatically reset by reassigning a default constructed value to the holder. This way a newly added global will not be missed in the future. Change-Id: Id3a62e30427cec9980ea076366e30b419ce1c2c6 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Implement qt-toplevel-drag-v1David Redondo2023-06-051-0/+3
| | | | | | | | | | | | | This protocol for tabs toolbars and dock widgets to be dragged in and out of a main window using an extended version of the drag and drop protocol. Application code in QtBase use a special internal mimedata to specify a window that should be associated with a drag. This is 1:1 match with the pending upstream proposal xdg-toplevel-drag, and can be switched when that lands. Change-Id: Idf0afb71cd98d45938b4641ce861484fffac911c Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Implement cursor_shape_v1David Edmundson2023-06-011-1/+4
| | | | | | | | | | | | | | A new wayland protocol allows clients to specify the cursor being used rather than load themes and attach buffers. Short term this has better behavior for scaling. Long term when this has universal compositor support we can drop the theme loading code. Change-Id: I119e1ca44d351e7b13b8ec56f2218d94b7da0705 Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Client: Check for shell integration when initializing platform pluginIlya Fedin2023-04-031-1/+1
| | | | | | | | | | | | | | 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>
* Introduce path for surviving compositor restartsDavid Edmundson2023-03-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Implement fractional_scale_v1 and wp_viewportDavid Edmundson2022-12-071-0/+8
| | | | | | | | | | | | | 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>
* Also use text-input if QT_IM_MODULE is empty or "wayland"Weng Xuetian2022-07-131-1/+5
| | | | | | | | | | | | | | Previously, text input can only be used when only when QT_IM_MODULE is unset, it is counter-intuitive when empty and null has different meaning. Additionally making "wayland" to use text input to make it easier to enforce wayland context. Gtk's relevant value is also "wayland" so it will be more consistent. Pick-to: 6.4 6.3 6.2 Change-Id: I39b8c899b0ab7965d4b17ca29ed9eadc14f17e88 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
* Use SPDX license identifiersLucie Gérard2022-06-101-38/+2
| | | | | | | | | | | 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>
* Replace QScopedPointer with std::unique_ptrThiago Macieira2022-05-111-2/+2
| | | | | | | | | | | | | As the warning asked. qwaylandshellintegrationfactory.cpp:67:28: warning: ‘T* QScopedPointer<T, Cleanup>::take() [with T = QtWaylandClient::QWaylandShellIntegration; Cleanup = QScopedPointerDeleter<QtWaylandClient::QWaylandShellIntegration>]’ is deprecated: Use std::unique_ptr instead, and call release(). [-Wdeprecated-declarations] As a drive-by, change *foo.get() to *foo. Pick-to: 6.3 6.2 Change-Id: I7fb65b80b7844c8d8f26fffd16e97fe161d6a67a Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtWaylandClient: use the CMake exports.h supportThiago Macieira2022-04-281-2/+2
| | | | | | | | | | | | The one in qtwaylandglobal.h was wrong. It just happened to work on Linux because the lack of import wasn't an error... until GCC 12 with -mno-direct-extern-access. Pick-to: 6.3 Change-Id: If05aeeb7176e4f13af9afffd16e8535b469f9158 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add globalRemove to QWaylandClientExtensionDavid Redondo2022-03-091-0/+4
| | | | | | | | | | | | Adds support for handling of removal of the relevant global to QtWaylandClientExtension. The user is responsible for destroying the object once it becomes inactive to match the behavior on destruction. Two signals for globals and their removal are added to QWaylandDisplay to make it a bit nicer to use in a more "Qt-way". The addRregistryListener function is kept for now until other places are ported. Change-Id: I4ccbaa32e18a5ae15871aa23639e2b4a372cc34e Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Add client support for the text-input-unstable-v1 protocolDominik Holland2022-02-021-0/+3
| | | | | | | | | | | | | | | | This is used by weston for forwarding virtualkeyboard related event from keyboard applications to a Qt client. Right now Qt only supports text-input-unstable-v2, v4 and the special qt-input-method protocol, while weston only supports text-input-unstable-v1. Without this, a virtual-keyboard application can't be used with a Qt client within weston. Change-Id: I9a34a87100854bb0b0f76762ced56419e70c297e Reviewed-by: Inho Lee <inho.lee@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix build with -no-feature-tableteventLiang Qi2022-01-251-0/+6
| | | | | | | | Pick-to: 6.2 6.3 5.15 Fixes: QTBUG-99965 Change-Id: Ib7fcf92973b4e559713ae27ad0c7f843f9122daf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Introduce new qt-shell and an API for custom shellsPaul Olav Tvete2021-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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-191-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Refactor QT_WAYLAND_TEXT_INPUT_PROTOCOLInho Lee2021-11-081-3/+2
| | | | | | | | | | | Redundant logics are moved from registry_global. QT_WAYLAND_TEXT_INPUT_PROTOCOL works with priority. If QT_WAYLAND_TEXT_INPUT_PROTOCOL is empty or invalid, the order of priority is qt_text_input_method_v1;zwp_text_input_v2 Task-number: QTBUG-96414 Change-Id: I1601091782ee63a57cbc678604b604d0ea287ccd Reviewed-by: Liang Qi <liang.qi@qt.io>
* Support different text input protocols - updateLiang Qi2021-10-201-0/+2
| | | | | | | | | | | | | | | This amends 99a6eb7b79471114705d7c68b0d5b388ea16ac03. Only update text input when needed. And try to unregister the ones which are not needed. For client side, when QT_WAYLAND_TEXT_INPUT_PROTOCOL contains multiple valid ones, the order doesn't matter now. Fixes: QTBUG-97394 Task-number: QTBUG-96414 Change-Id: Ibe174056a4d4a4f2026e488d2ea99ec875b11ccc Reviewed-by: Inho Lee <inho.lee@qt.io>
* Move the wayland socket polling to a separate event threadGiulio Camuffo2021-10-181-14/+6
| | | | | | | | | | | | | | | | | | | | | New event threads is introduced which calls poll() on the wayland fd, instead of relying on the event dispatcher by using the QSocketNotifier. This allows to call in the proper order the wl_display_prepare_read(), poll() and wl_display_read_events() functions. One thread is responsible for the default queue; when needed, it emit a signal so that the main thread can dispatch the queue. Another thread is responsible for the dedicated queue for frame callbacks; this thread will dispatch events on the thread itself. QWaylandWindow is updated to, instead of each window's dedicated event queue, use this queue for frame callbacks. Co-authored-by: Ratchanan Srirattanamet <ratchanan@ubports.com> Task-number: QTBUG-66075 Change-Id: Ibb33ad7f4193b866d1b8d7a0405a94d59dcad5eb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Support different text input protocolsLiang Qi2021-10-071-0/+4
| | | | | | | | | | | | | | | | | | | 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>
* Wayland client: use wl_keyboard to determine active stateMéven Car2021-10-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit f497a5bb87270174b8e0106b7eca1992d44ff15d made QWaylandDisplay use the xdgshell's active state for QWindow::isActive(), instead of using wl_keyboard activate/deactivate events. That seems to have been a misunderstanding, since xdgshell activation is only supposed to be used to determine visual appearance, and there is an explicit warning not to assume it means focus. This commit reverts this logic back to listening to wl_keyboard. It adds a fallback when there is no wl_keyboard available to handle activated/deactivated events through xdg-shell, in order to fix QTBUG-53702. windowStates is handled so that we're not using the Xdg hint for anything with QWindowSystemInterface::handleWindowStateChanged or anything where we need to track only having one active. We are still exposing it for decorations, which is the only reason to use the Xdghint over keyboard focus - so you can keep the toplevel active whilst you show a popup. Change-Id: I4343d2ed9fb5b066cde95628ed0b4ccc84a424db Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Client: Drop unused member variableDavid Edmundson2021-07-231-1/+0
| | | | | Change-Id: I9b3f1d1a2ff2e9658604778e1ab4b8b7c030e1ac Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Implement support for pointer gestures v1Povilas Kanapickas2021-05-281-0/+3
| | | | | Change-Id: Ie9ee615de123e6deab5b7a5081ca9bcf53399df7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* client: Allow QWaylandInputContext to accept composed key combinationsAleix Pol2021-04-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | At the moment, we are forcing user to choose to either compose or use the text-input channel. This patch brings some of the QComposeInputContext functionality in order to let applications understand dead key combinations like they are supposed to. Having it in QWaylandInputContext rather than in QWaylandInputDevice should solve the problems 3aedd01271dc4f4a13103d632df224971ab2b6df had with 57c4af2b18c0fb1d266b245a107fa6cb876b9d9e, because we are doing it in the input context rather than before. This way, if the user is overriding the input method (e.g. by setting QT_IM_MODULE), all the key strokes will still be properly forwarded to the module to use. This in turn allows us to solve https://bugs.kde.org/show_bug.cgi?id=411729 and https://bugs.kde.org/show_bug.cgi?id=405388 since we don't need to choose anymore between physical and virual keyboards anymore. Pick-to: 5.15 Change-Id: I8601f5d7ae21edf4b3a1191fa75877286e505588 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Handle registry_global out of constructorElvis Lee2021-03-041-0/+2
| | | | | | | | | Factory functions in QWaylandDisplay::registry_global() can be overridden. Later, other classes instantiated in the registry_global can support platform specific implementation with inheritance and some factory function. Change-Id: I92ce574e049b8c91587687cc7c30611f3dfdbe56 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Client: Generate method to expose used version of a given proxyDavid Edmundson2021-02-241-2/+0
| | | | | | | | | | Relying on the compositor version only works for the core protocols. Using the version of our relevant object is more extensible and relies on less caching. Pick-to: 6.1 Change-Id: I1044e43a1e24a25359db95988c9956f4f1b5d35f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove some dead codeEskil Abrahamsen Blomfeldt2020-12-171-1/+0
| | | | | | | | | The waitForScreens() function has not been used for a while, so to avoid confusion around the different entry points to event processing, we remove it. Change-Id: I3a801492ab87b4835e0e1b3c9e264c29c1688c06 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Fix race condition on frame callbackPaul Olav Tvete2020-10-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the frame listener callback is moved to a different queue while the frame event is being processed, the event will not get delivered. (It will not even show up in the WAYLAND_DEBUG output.) This will cause waitForFrameSync() to hang until it times out. To avoid this, perform the move just after the callback has been created. This exposed an issue with single-threaded rendering, where a new update would be started from inside the callback, resetting mWaitingForFrameCallback before waitForFrameSync could react to it. This caused all rendering to freeze. To avoid that problem, do not deliver update requests directly from the frame callback. With the callback always on a separate queue, we then have to make sure that queue is also dispatched during the main event loop, otherwise the events may not be processed. To do this, we need a mutex lock. But it turns out that we no longer need a global mutex lock as long as the frame events are being dispatched on their own queues, but can manage with per-window locks instead. A final thing needed is to make sure the frame callback does not request additional updates while we are already waiting for the main thread to process the last one. This is to avoid flooding the main event loop with events, when the main thread is processing them at a slower pace than the frame rate. Fixes: QTBUG-83263 Pick-to: 5.15 Done-with: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Change-Id: I0db9da64fc8ced147177391c2a7999c4cc7a0d58 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>
* New input method protocol for use with Qt clientsEskil Abrahamsen Blomfeldt2020-08-261-0/+3
| | | | | | | | | | | | | | | | | We introduce an alternative input-method protocol, which is a one-to-one mapping to Qt's input method API. Input methods such as the virtual keyboard's hunspell integration is quite sensitive to the inner workings of the input method handling, both in terms of when state is updated and which updates are delivered when. With a one-to-one mapping we are able to match these expectations and keep a well-synchronized state. Task-number: QTBUG-85135 Task-number: QTBUG-85134 Change-Id: Id69c22a7b0885ea59f39fdcc8d663749af56c7ce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Adapt to recent qtbase changes and update dependenciesFriedemann Kleint2020-07-291-1/+1
| | | | | | | | | - moving linuxaccessibility/xkbcommon/eglsupport/glxsupport to QtGui - event refactoring Task-number: QTBUG-83255 Change-Id: Ic82ee6ef5652413781468edb58c601ee7dce2e3b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Declare QWaylandDisplay::findExistingCursorTheme noexceptShawn Rutledge2020-06-261-1/+1
| | | | | | | | | | Fixes error: exception specification in declaration does not match previous declaration Amends 35efe87ccc20bd80e60d23d5ec2a9581ad5e32b9 Change-Id: I7e27ffd5bb3aa4c71680809268d86ba25242833a Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Use QList instead of QVectorJarek Kobus2020-06-081-3/+3
| | | | | | Task-number: QTBUG-84469 Change-Id: I4bc7b2eb2913fc828f09f96e21480b76cabf8656 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QWaylandDisplay: replace a QMap<pair<QString,int>, pointer*> with a ↵Marc Mutz2020-05-181-1/+16
| | | | | | | | | | | | | | std::vector<{QString, int, unique_ptr}> The vector is sorted, so lookup performance is the same, or better. Insertion performance is worse, of course, at least in big-O terms, but probably not in practice. But now the good part: saves a stunning 7.2KiB (0.6%) in text size on optimized AMD 64 Linux GCC 9.1 builds. Change-Id: Ie604f83d7d51111430db1d0bb89d8cc3a52301bf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Client: Upgrade to xdg-output-unstable-v1 version 3Johan Klokkhammer Helsing2020-01-131-3/+3
| | | | | | | [ChangeLog][QPA plugin] xdg-output-unstable-v1 version 3 is now supported. Change-Id: I054b2946e86175eabe76731bac94e5f287c4ee58 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Client: Add basic support for tablet-unstable-v2Johan Klokkhammer Helsing2020-01-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Added support for drawing tablets through the tablet-unstable-v2 protocol. Adds support for the basic one tablet, one tool, no pads scenario. Besides the auto tests, I tested with a Huion Kamvas Pro 16 with a simple pressure sensitive pen with two buttons. As far as I can tell, it works the same way as on xcb on Sway and Gnome Shell. Also tested on a Wacom PTZ-630 with a mouse, art pen, airbrush and a stylus. Mapped the distance event to QTabletEvent::Z and slider to QTabletEvent::tangentialPressure. For now we send QTabletEvents even when there's a mouse or finger on the tablet. Those should ideally be sent as QMouseEvents/QTouchEvents, but that's out of scope for this patch, but at least we will send synthesized mouse events if the tablet events are not accepted. Change-Id: I93291ffa5f00fa2bb8533eddd8d873b84a3386b8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Client: Support running with no screensJohan Klokkhammer Helsing2019-11-121-0/+4
| | | | | | | | | | [ChangeLog][QPA plugin] The QPA plugin now supports running with no screens attached. This is handled by adding a fake screen when the last screen is disconnected, similarly to what the other QPA plugins do. Fixes: QTBUG-79111 Change-Id: I4a0e023ae784217dd030f0c62f12487fdff4825c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Johan Klokkhammer Helsing2019-09-031-1/+0
|\ | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp Change-Id: Ifd64debc484197829d2fe412afa98c29b382efa5
| * Merge remote-tracking branch 'origin/5.12' into 5.13Johan Klokkhammer Helsing2019-08-291-1/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputdevice.cpp src/client/qwaylandintegration.cpp src/client/qwaylandwindow_p.h src/shared/qwaylandxkb.cpp Change-Id: Ibac7998502351e93c71c9b786536298657afe3d0
| | * Client: Crash instead of exit when there's a wayland errorJohan Klokkhammer Helsing2019-08-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Qt applications should not call exit. Task-number: QTBUG-75779 Change-Id: I91190b10f8c8e111996cd73283061e6ceaa6b1f6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | | QWaylandDisplay: make hasRegistryGlobal() const-correct and take a QStringViewMarc Mutz2019-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Also port a Q_FOREACH loop to C++11 ranged-for. Change-Id: Ifde232a00e6abed285efaf146a48521c7df25378 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Client: Implement primary-selection-unstable-v1Johan Klokkhammer Helsing2019-05-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Added support for middle mouse pasting through the primary-selection-unstable-v1 protocol. Fixes: QTBUG-66008 Change-Id: I7c8fb9aa2c856f5b6794aeab1ee75d80cad05dcd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devJohan Klokkhammer Helsing2019-05-071-3/+28
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay_p.h src/client/qwaylandwindow.cpp Change-Id: I50eb5c83a8b81e4bdb032b68d41f429b17d0a74d