summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandinputdevice_p.h
Commit message (Collapse)AuthorAgeFilesLines
* use new feature name xkbcommon_evdev -> xkbcommonGatis Paeglis2018-12-051-5/+5
| | | | | | | | | The xkbcommon configure logic was refactored in qtbase/c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a. For more details see the relevant commit. Change-Id: Ic1aa26846ab8266c589f6e92dc8b81aba36df58a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Adapt the cursor size per screenAleix Pol2018-05-151-3/+3
| | | | | | | | | | Adapt the cursor size to the screen's devicePixelRatio, so we are not forced to have a tiny cursor on a high dpi screen or a huge cursor on external low-dpi displays. Change-Id: I3712dc64e5c5e2e05d0dc5943bd49ba5c1335cd3 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Use override when applicableJohan Klokkhammer Helsing2018-02-281-4/+4
| | | | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-override. This adds the "override" keyword where it's possible and also removes the "virtual" keyword when redundant. Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use default member initialization for raw pointersJohan Klokkhammer Helsing2018-02-281-6/+6
| | | | | | | | Initialize to nullptr to prevent undefined behavior. Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Simplify and modernize QWaylandInputDeviceJohan Klokkhammer Helsing2017-12-051-18/+18
| | | | | | | | Use enum values and nullptr instead of using magic ints directly. Also get rid of ifdefs in constructors by using in-class member initializers. Change-Id: I037bec7070296a4a8cb46ebe85104caf5a08fb77 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Implement basic key composition supportGiulio Camuffo2017-12-041-0/+9
| | | | | | | | | | | Use xkbcommon-compose to handle basic compose key support. We should expand on it in the future to handle things like resetting the compose state on text field switching. Task-number: QTBUG-54792 Task-number: QTBUG-64572 Change-Id: I9d1d5ca4c9991928e12979f69eaa477e0cb28ada Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Client: Use QPointer for focus members of input device capabilitiesJohan Klokkhammer Helsing2017-11-171-3/+4
| | | | | Change-Id: I2824269f89fddb7e276cf0e35df3f7c063b6d8b3 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Pass modifiers with wheel eventsDavid Edmundson2017-05-121-1/+2
| | | | | Change-Id: I345cdeea1357a8f9201a74b2d5e80350b6c42f24 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Clean up draganddrop and clipboard featuresPaul Olav Tvete2017-03-231-0/+4
| | | | | | | | | | | | Don't assume that no-draganddrop implies no-clipboard. Introduce a new private feature wayland-datadevice which contains the common functionality. This feature cannot be controlled independently, but is automatically disabled when both clipboard and draganddrop are disabled. Change-Id: I6aac09c7ee524e3b11f0a1caa4a6c62fc3f1d10f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Replace all occurrences of Q_DECL_OVERRIDE with overrideJohan Klokkhammer Helsing2017-01-231-16/+16
| | | | | Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix build without feature.cursorTasuku Suzuki2017-01-131-0/+8
| | | | | Change-Id: If244e7ac58133ae6fbefacfa243d47fa210140be Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use the feature system internallyLars Knoll2016-11-231-4/+5
| | | | | | | | | Get rid of almost all DEFINES += ... in the pro files, instead use the proper QT_CONFIG() macro to determine whether a feature is available. Change-Id: I867769be2085c6ba93b6815e223e2b89edcb245d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Don't reset the cursor at every mouse moveGiulio Camuffo2016-11-221-1/+4
| | | | | Change-Id: I67f9a0d171da403ebb124ab584c2510891da80fc Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'qt/5.6' into 5.7Paul Olav Tvete2016-11-101-0/+4
|\ | | | | | | Change-Id: I1efd16d6c5f939d61001376c3b010eae1927595b
| * Client: Cleanup mouse state after dragJohan Klokkhammer Helsing2016-11-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes an issue where dragging with the mouse would cause the next touch event to not generate a synthesized mouse press event. The touchDrag test can now be run directly after the mouseDrag test without failing. Task-number: QTBUG-56187 Change-Id: I53cc5f90fc8d8672936b23f54a017687d41c31fc Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Client: Fix touch getting stuck after drag-and-dropJohan Klokkhammer Helsing2016-11-091-0/+2
| | | | | | | | | | | | | | | | | | wl_touch.up is not sent by compositors when dragging, so release all touch points when the drag ends. Task-number: QTBUG-56187 Change-Id: I1c3d03c72e75a551355c50bb5d82433f5e2e35f0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-4/+0
|\| | | | | | | Change-Id: I75a8ddc0652f3c6f438ef98e940c9357450d29c6
| * Use xdg_shell configure events to determine active windowJohan Klokkhammer Helsing2016-07-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the xdg_shell protocol, the compositor is allowed to set multiple active windows. Qt's model, however, allows only a single active window. In order to map between the models, a list of the compositor's active windows is kept in QWaylandDisplay in the order they were activated. Hence, the front of this list will always be the most recently activated window, and it will be mapped as Qt's active window. Previously keyboard focus was used to determine the active window, this method has been disabled for xdg_shell. Functionality for delaying the call to QWindowSystemInterface::handleWindowActivated has been moved from QWaylandInputDevice::Keyboard to QWaylandDisplay so the implementations can share the workaround. Task-number: QTBUG-53702 Change-Id: I878151f9c52ed09a8d6571c6208920436c3ca8fc Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-301-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputcontext_p.h src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h Change-Id: Iac517e1985e4e67d7ca00ca4c10dcda9dd9079f9
| * Add missing Q_DECL_OVERRIDEs to client classes.Johan Klokkhammer Helsing2016-06-271-1/+1
| | | | | | | | | | | | Change-Id: I10e550a25ce498bbeedc242ac73059cc6fdcef30 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Fix text-input support for new APIJan Arne Petersen2016-04-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-221-0/+5
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandcompositor.h src/compositor/compositor_api/qwaylandquickcompositor.h src/compositor/compositor_api/qwaylandsurfaceitem.h src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration_p.h Change-Id: I094128be314d2c3d4fe350fa7a162e37da34ae10
| * Add support for bitmap cursorsMartin Gräßlin2016-03-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far QtWayland did not support custom bitmap/pixmap QCursors. This change adds support for them by creating a QWaylandShmBuffer and copying the pixmap data into that buffer. The internal API to set cursors images is changed to not only rely on wl_cursor_image, but also allow to just set the buffer with a specific size and a hot spot. The created WaylandShmBuffer is passed around as a shared pointer, so that it can be automatically cleaned up once the cursor image is no longer used on any seat. Task-number: QTBUG-51604 Change-Id: I1f1ee87f03186c3d564468d3e8ea2a3141d7e2fb Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-201-14/+20
|/ | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I76ae5d3e64f096eb3163d6163a38d68c7c1ca756 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-051-0/+11
| | | | | Change-Id: I70c01453b3939d1d645d626ae84c21ab4c9d267a Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix wheel events when the decorations are enabledGiulio Camuffo2015-06-091-1/+12
| | | | | | | | | We must offset the wheel events' position, as we do with the other types of mouse events. Change-Id: If85e93ffe95304c7dee4c2a3ff195a73243a8182 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-171-22/+14
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Update the protocol to 1.4 and raise the required libwayland versionGiulio Camuffo2015-02-031-0/+1
| | | | | | | | Wayland 1.4 introduces wl_subsurface which is quite an important addition. Change-Id: I48375f60adce556c9989872319f4d073e4a7b13b Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Namespace the platform pluginsGiulio Camuffo2015-01-291-0/+3
| | | | | | | | | | | | There currently is a QWaylandInputDevice class both in the wayland QPA plugin and in the QtCompositor API. This causes the qwindow-compositor example to crash when running nested in a wayland session due to a mismatch between the two classes. By namespacing all the plugin code we make sure that name clashes will not happen anymore. Change-Id: I17497cff697599200bea68bf01dfde474526390f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Send proper mouse enter eventsGiulio Camuffo2015-01-131-1/+23
| | | | | | | | The wl_pointer.event carries the surface local position of the pointer. Notify Qt of it, without pretending it to be a motion event. Change-Id: Ibbe1d125a93b478f9c350a50bfea25b01f628178 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Merge branch '5.4' into devGiulio Camuffo2014-11-151-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge done by Giulio Camuffo Conflicts: src/client/client.pro src/client/qwaylanddisplay.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandinputdevice_p.h src/client/qwaylandwindow.cpp src/compositor/compositor_api/qwaylandsurface.cpp src/compositor/compositor_api/qwaylandsurface_p.h src/compositor/wayland_wrapper/qwlsurface.cpp Change-Id: I1df878bb54f49d953c51215a2772869e261ebe81
| * Be compatible with older compositorsGiulio Camuffo2014-10-131-1/+1
| | | | | | | | | | | | | | | | When binding globals take care of the version the compositor provides and don't call requests that the compositor doesn't implement. Change-Id: Iea0c534fb9e005720857e2778e380b6a9c22a6f3 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Allow client side input device customizationMikko Levonmaa2014-10-061-10/+133
|/ | | | | | | | | | | Introduces QWaylandInputDeviceIntegration plugins to allow customization of input device related behavior. The plugin can be activated via the environment variable QT_WAYLAND_INPUTDEVICE_INTEGRATION Change-Id: If5629737752afacb29161f51c1b7c6e171fb2758 Reviewed-by: Mikko Levonmaa <mikko.levonmaa@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix namespaced buildGiulio Camuffo2014-08-071-1/+3
| | | | | Change-Id: Id73f8ddffe00359f38c634fc88b1f81ac5638653 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Move the code for seat's keyboard, pointer and touch in different classesGiulio Camuffo2014-01-061-74/+12
| | | | | | | | | | This allows to remove the keyboard, pointer or touch objects when the wl_seat advertizes it is gone. Also fixes multiple keyboard, pointer and touch binding for the same object. Change-Id: I878f494caf7f4ac277b6a4d24037dcecf9ff84e4 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Make classes in client privateJorgen Lind2013-12-271-0/+204
Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979 Reviewed-by: Andy Nichols <andy.nichols@digia.com>