summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandcursor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Client: Move cursor theme logic into its own class, QWaylandCursorThemeJohan Klokkhammer Helsing2018-05-281-169/+193
| | | | | | | | | | | | | ...and out of QWaylandCursor. Encapsulates the ugly details of wayland cursor themes, and presents a simple interface. A theme is created with a given size and theme name. wl_cursor_images for a theme can be acquired through: wl_cursor_image *QWaylandCursorTheme::cursorImage(Qt::CursorShape shape); Change-Id: Ia6fc6f2997133ca25c1610ecdf075ecb5c4edbfa Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Client: Only load cursor theme onceJohan Klokkhammer Helsing2018-05-281-21/+1
| | | | | | | | Now cursor themes load once per device pixel ratio, and not once per screen. Task-number: QTBUG-67796 Change-Id: I4c253e65a791d69e7d510c4228989390a4343110 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Adapt the cursor size per screenAleix Pol2018-05-151-9/+10
| | | | | | | | | | 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 nullptr instead of 0 or NULLJohan Klokkhammer Helsing2018-02-201-6/+6
| | | | | | | | 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>
* Use QImage::sizeInBytes() instead of deprecated QImage::byteCount()Johan Klokkhammer Helsing2017-10-191-1/+1
| | | | | Change-Id: If3f21fc43d0118c1819d354c8ef43f1b79617c7b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-261-1/+1
| | | | | | | Change-Id: I9699a957430b8d3574ce29acb91b7ada9ea6209b Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Code cleanup (fixing -no-feature-cursor)Paul Olav Tvete2017-03-081-25/+0
| | | | | | | | Move QWaylandDisplay member functions into the correct .cpp file. Change-Id: Ie3915d2bd0d191900ad2fd306564bb732e40221a Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-221-1/+28
|\ | | | | | | | | | | | | | | | | | | 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-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 QWayland::shm object to clientMikko Levonmaa2015-09-251-1/+1
|/ | | | | | | | | | Allows more flexibility for the client to determine additional shm formats supported by the compositor in addition to the standard types. For example YUV formats. Change-Id: Ib4a47c1d5bbeed9314d5ad5f5f8e1551c1dd71e4 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Mikko Levonmaa <mikko.levonmaa@bitfactor.fi>
* Use by-ref in foreach where T is non-trivialSergio Martins2015-07-041-1/+1
| | | | | Change-Id: Iac40929aebc1e0f507b729b0c01a2ccb18516c37 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.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>
* Namespace the platform pluginsGiulio Camuffo2015-01-291-0/+4
| | | | | | | | | | | | 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>
* Fix crash when cursor theme can not be loadedOlivier Blin2014-10-211-1/+7
| | | | | | | | | | Also add a debug message about theme loading failure. This is not necessarily fatal, some embedded applications could still function properly without a cursor. Change-Id: Ib3e2ee43b00630ee77997c7472a95ac5a22c2cc2 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Make classes in client privateJorgen Lind2013-12-271-5/+5
| | | | | Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Move wayland into a client directory not under the plugins src folderJorgen Lind2013-12-271-0/+302
And make wayland common files into a library, exporting all classes. Now there is no need to do bulild hacks to make your own version of the wayland plugin. Change-Id: Ib4872863dfb5ab3f2bc0f4a94ae16fc1e7b63b88 Reviewed-by: Andy Nichols <andy.nichols@digia.com>