diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-01-09 13:33:44 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:09:41 +0200 |
commit | e946c76e74762081d6c407e2ca23ec04c422bdfe (patch) | |
tree | c9fe7ec09a3d5cd27f2e011d786fc6ed594daa16 /src/compositor/wayland_wrapper | |
parent | 28e271ed80c7f1a2f3ace99109825bd15ef989fc (diff) |
Deprecate the cursor change request and make it a signal
Change-Id: Icafab695071259e2112e9742ba46a19c1dc74586
Diffstat (limited to 'src/compositor/wayland_wrapper')
-rw-r--r-- | src/compositor/wayland_wrapper/qwlpointer.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/compositor/wayland_wrapper/qwlpointer.cpp b/src/compositor/wayland_wrapper/qwlpointer.cpp index d587157b9..27887ba54 100644 --- a/src/compositor/wayland_wrapper/qwlpointer.cpp +++ b/src/compositor/wayland_wrapper/qwlpointer.cpp @@ -308,19 +308,27 @@ void Pointer::button(uint32_t time, Qt::MouseButton button, uint32_t state) setFocus(m_current, m_currentPoint); } +static void requestCursorSurface(QWaylandCompositor *compositor, QWaylandSurface *surface, int32_t hotspot_x, int hotspot_y) +{ +#if QT_DEPRECATED_SINCE(5, 5) + compositor->setCursorSurface(surface, hotspot_x, hotspot_y); +#endif + compositor->currentCurserSurfaceRequest(surface, hotspot_x, hotspot_y); +} + void Pointer::pointer_set_cursor(wl_pointer::Resource *resource, uint32_t serial, wl_resource *surface, int32_t hotspot_x, int32_t hotspot_y) { Q_UNUSED(resource); Q_UNUSED(serial); if (!surface) { - m_compositor->waylandCompositor()->setCursorSurface(NULL, 0, 0); + requestCursorSurface(m_compositor->waylandCompositor(), Q_NULLPTR, 0, 0); return; } Surface *s = Surface::fromResource(surface); s->setCursorSurface(true); - m_compositor->waylandCompositor()->setCursorSurface(s->waylandSurface(), hotspot_x, hotspot_y); + requestCursorSurface(m_compositor->waylandCompositor(), s->waylandSurface(), hotspot_x, hotspot_y); } PointerGrabber::~PointerGrabber() |