summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/coreprotocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/client/shared/coreprotocol.cpp')
-rw-r--r--tests/auto/client/shared/coreprotocol.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/client/shared/coreprotocol.cpp b/tests/auto/client/shared/coreprotocol.cpp
index 54725e81..6f51a979 100644
--- a/tests/auto/client/shared/coreprotocol.cpp
+++ b/tests/auto/client/shared/coreprotocol.cpp
@@ -263,10 +263,22 @@ uint Pointer::sendEnter(Surface *surface, const QPointF &position)
wl_client *client = surface->resource()->client();
const auto pointerResources = resourceMap().values(client);
for (auto *r : pointerResources)
- send_enter(r->handle, m_enterSerial, surface->resource()->handle, x ,y);
+ wl_pointer::send_enter(r->handle, m_enterSerial, surface->resource()->handle, x ,y);
return m_enterSerial;
}
+uint Pointer::sendLeave(Surface *surface)
+{
+ m_enterSerial = 0;
+ uint serial = m_seat->m_compositor->nextSerial();
+
+ wl_client *client = surface->resource()->client();
+ const auto pointerResources = resourceMap().values(client);
+ for (auto *r : pointerResources)
+ wl_pointer::send_leave(r->handle, serial, surface->resource()->handle);
+ return serial;
+}
+
// Make sure you call enter, frame etc. first
void Pointer::sendMotion(wl_client *client, const QPointF &position)
{