From 60d6d83ea0c43462d5f8e17aaa654ab6f625dd6e Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 21 Dec 2018 14:31:58 +0100 Subject: Client xdg-shell: Add test for tooltips on popups This used to cause protocol errors. Task-number: QTBUG-71734 Change-Id: Ic937210fc42c93f1d411fb0fb4f269de01f07b5b Reviewed-by: Paul Olav Tvete --- tests/auto/client/shared/coreprotocol.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/auto/client/shared/coreprotocol.cpp') diff --git a/tests/auto/client/shared/coreprotocol.cpp b/tests/auto/client/shared/coreprotocol.cpp index 54725e812..6f51a9793 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) { -- cgit v1.2.3