From 98b7643fdd5af8a4dccf2e6e6f2bc3bedda7d23f Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 6 Dec 2018 09:06:33 +0100 Subject: [PATCH] Client: Clarify warnings about unexpected enter/leave events With the previous wording it was a bit unclear whether this was a client problem or not. Also adds logging category. Change-Id: I61084c0b2c7f17408575d1d4b6cc7809c4c6d99d Reviewed-by: David Edmundson Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 8e8726f0218..029820e2c7f 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -496,9 +496,11 @@ void QWaylandWindow::surface_enter(wl_output *output) auto addedScreen = QWaylandScreen::fromWlOutput(output); if (mScreens.contains(addedScreen)) { - qWarning() << "Unexpected wl_surface.enter received for output with id:" - << wl_proxy_get_id(reinterpret_cast(output)) - << "screen name:" << addedScreen->name() << "screen model:" << addedScreen->model(); + qWarning(lcQpaWayland) << "Ignoring unexpected wl_surface.enter received for output with id:" + << wl_proxy_get_id(reinterpret_cast(output)) + << "screen name:" << addedScreen->name() + << "screen model:" << addedScreen->model() + << "This is most likely a bug in the compositor."; return; } @@ -515,9 +517,11 @@ void QWaylandWindow::surface_leave(wl_output *output) auto *removedScreen = QWaylandScreen::fromWlOutput(output); bool wasRemoved = mScreens.removeOne(removedScreen); if (!wasRemoved) { - qWarning() << "Unexpected wl_surface.leave received for output with id:" - << wl_proxy_get_id(reinterpret_cast(output)) - << "screen name:" << removedScreen->name() << "screen model:" << removedScreen->model(); + qWarning(lcQpaWayland) << "Ignoring unexpected wl_surface.leave received for output with id:" + << wl_proxy_get_id(reinterpret_cast(output)) + << "screen name:" << removedScreen->name() + << "screen model:" << removedScreen->model() + << "This is most likely a bug in the compositor."; return; }