summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/mockcompositor.h
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-02-06 09:31:41 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-02-27 11:48:56 +0000
commit19e4f721c596a1a2f6446e24e7993b0e6d8a91a7 (patch)
tree37970e48a5f88f4a06789ecb94119c7f68c8c3e6 /tests/auto/client/shared/mockcompositor.h
parent021bd4d7ed1f4221a0132e21ef0ee5b07f74be3e (diff)
Client tests: Add convenience for getting cursor surface
Let's simplify all those pointer()->surfaceCursor() calls. Change-Id: I83c51f460fa2313a0b84c8c64509d48027156443 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'tests/auto/client/shared/mockcompositor.h')
-rw-r--r--tests/auto/client/shared/mockcompositor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/client/shared/mockcompositor.h b/tests/auto/client/shared/mockcompositor.h
index ddbd7f342..75ef1eaea 100644
--- a/tests/auto/client/shared/mockcompositor.h
+++ b/tests/auto/client/shared/mockcompositor.h
@@ -54,6 +54,7 @@ public:
XdgToplevel *xdgToplevel(int i = 0) { return get<XdgWmBase>()->toplevel(i); }
XdgPopup *xdgPopup(int i = 0) { return get<XdgWmBase>()->popup(i); }
Pointer *pointer() { auto *seat = get<Seat>(); Q_ASSERT(seat); return seat->m_pointer; }
+ Surface *cursorSurface() { auto *p = pointer(); return p ? p->cursorSurface() : nullptr; }
Keyboard *keyboard() { auto *seat = get<Seat>(); Q_ASSERT(seat); return seat->m_keyboard; }
uint sendXdgShellPing();
void xdgPingAndWaitForPong();