summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Support TextInput V3 over v4-wipDavid Edmundson2023-12-131-43/+21
| | | | | | | | | | | | | | | | | 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>
* 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-101-28/+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>
* Also accept a client text-input extension registered too lateDominik Holland2022-03-151-6/+13
| | | | | | | | | | | | | | | 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>
* Support text-input-unstable-v4-wipInho Lee2021-11-191-4/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-071-1/+6
| | | | | | | | | | | | | | | | | | | 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>
* New input method protocol for use with Qt clientsEskil Abrahamsen Blomfeldt2020-08-261-7/+36
| | | | | | | | | | | | | | | | | 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>
* CMake: Regenerate and adjust projects after mergeAlexandru Croitor2020-03-261-0/+2
| | | | | | | | | | | | | | | Some of the changes that were needed - adjusted wayland macros due to changed target names for plugins - a few direct moc file includes, to get rid of compilation errors - Threads::Threads linking for a few tests - a few special cases for QT_FOR_PRIVATE handling because pro2cmake doesn't handle those correctly at the moment (they map to PRIVATE_MODULE_INTERFACE rather than PRIVATE_LIBRARIES) - just regenerating all projects Change-Id: I418ce91b1c69c7388d41eb22b94a93a9e80fa732 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update QtWaylandCompositor license headers to GPL 3v5.14.0-beta2Paul Olav Tvete2019-10-161-15/+5
| | | | | | | | | | | | As announced on the mailing list, QtWaylandCompositor licensing is changing to GPLv3: https://lists.qt-project.org/pipermail/development/2019-October/037666.html Change-Id: I4bdc1aa5914e53ac760acc2b6453355af636baa9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-271-3/+1
| | | | | | | | | | | | | | | | | | | | clang-tidy -p compile_commands.json $file \ -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \ -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \ -header-filter='qtwayland' \ -fix Afterwards I ran search and replace on the diff to clean up some whitespace errors: - Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: ' - Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, ' - Replaced '\n\+\s*\n' with '\n' I also had to do some manual edits, because for some reason, this particular clang-tidy check doesn't trigger for some files. Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use nullptr instead of 0 or NULLJohan Klokkhammer Helsing2018-02-201-1/+1
| | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some manual cleanup to prevent QFlag macros to be affected. Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-041-12/+15
| | | | | | | | | | Currently tests are licensed under GPL-EXCEPT, examples under BSD and src under LGPL so replase old license headers with new & proper ones. Also remove old & unused license files Task-number: QTBUG-57147 Change-Id: Ia6a738798736c275dc309ccfa5b627dc2178d241 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix build without feature.imTasuku Suzuki2017-01-131-4/+0
| | | | | Change-Id: Ie29b87a4198cbe34df6746b10c7a17ee1fcd608d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use new feature system, part 2Lars Knoll2016-11-231-2/+2
| | | | | | | | | Convert all uses of QT_NO_FOO to proper QT_CONFIG(foo) checks. Change-Id: Id0f0b3325c246567a43d6b2d71b0d69e5535e648 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-111-7/+7
| | | | | | | | | | | | The name QWaylandInputDevice could be confusing and misleading: - A QWaylandInputDevice was not one input device, but a collection of many. - Classes that sounded like they should inherit from it did not, i.e: QWaylandKeyboard, QWaylandPointer and QWaylandTouch. - The Wayland protocol already has another term for this, which is seat. Change-Id: I9d9690d5b378075d9dddaeb8cf18395c7f47603e Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Avoid connect calls for null objectLaszlo Agocs2016-05-311-3/+6
| | | | | | | | | | textInput() may return null. No need to flood the output (f.ex. in qwindow-compositor) with warnings from QObject. Change-Id: Ifdd318f70a8d4dc37750cb80f58374979d6106aa Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Fix text-input support for new APIJan Arne Petersen2016-04-181-0/+162
Update text input support to upstream text-input protocol v2 from wayland-protocols. Remove support for input-method protocol for now. Map text-input protocol on compositor side to the Qt input method API, this allows to use any qt platform input method on compositor side (especially qtvirtualkeyboard). Add support for qtvirtualkeyboard to pure-qml example. Implement all missing functions of the text-input protocol. Change-Id: I597451ff65454a63dff86026b6a8d1ffbe07ce02 Done-with: Zeno Endemann <zeno.endemann@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>