summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandtextinput.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-111-1/+1
| | | | | | | | | | | | 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>
* Remove empty private class QWaylandExtensionTemplatePrivateJohan Klokkhammer Helsing2016-05-191-1/+1
| | | | | | | | Previous subclasses are now inheriting directly from QWaylandExtensionPrivate instead. Change-Id: I33ef88867fcf216a7b1441f69b7025bc2a4367dc Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Rename private headers to _p.hPaul Olav Tvete2016-05-191-2/+2
| | | | | | Change-Id: I0f0d1bd8efabc39325eec7dba4166ae0bccbf6ff Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Rename QWaylandExtension to QWaylandCompositorExtensionPaul Olav Tvete2016-05-181-2/+2
| | | | | | | | Since we have QWaylandClientExtension Change-Id: Ie8d60322c8e730bda651e06ed5db0fe1359d946e Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Fix wrong preedit styling indicesJan Arne Petersen2016-04-191-3/+3
| | | | | | | | Indices of QInputMethodEvent::TextFormat are relative to the preedit string and not the surrounding text. Change-Id: Ia2bd2a8d269e5258059bbad4d3e54f061603c76b Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Use function to convert indices for text protocolJan Arne Petersen2016-04-191-7/+7
| | | | | | | | | | | | | Use a proper function instead of left/midRef(index).toUtf8().size(). Makes it more clear what is happening and makes it easier when wayland text protocol switches from byte-based to unicode character-based indices. Also rename parameters of existing indexFromWayland() function to be the same as in the new function. Change-Id: Ie90abdcb264b74a024e96e041d5daf651920e9e4 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Set state to expected state inside compositorJan Arne Petersen2016-04-181-11/+39
| | | | | | | | | | | | | | | | | | | | | Some input methods like qtvirtualkeyboard expect to receive all updates to surrounding text, cursor position, etc before processing of the QInputMethodEvent is done. Else they assume the updates are happended because of some external input and reset all internal state regarding the input. Since we send the text events first to the client before we get status updates back from the client, the status of the virtual keyboard gets constantly reset. To work around this issue, we already update the state in the compositor while processing QInputMethodEvents to the state we expect to get sent later from the clients. As long as there is no difference between the state we expect the client will have and the precalculated state there will be no status updates sent to the qtvirtualkeyboard outside of processing QInputMethodEvents. Change-Id: Ife1b541510d754657fc18281a8d765ea97935fcc Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Fix text-input support for new APIJan Arne Petersen2016-04-181-0/+591
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>