From c50acc0179a85ee0a519c867fcfda1d11ba825db Mon Sep 17 00:00:00 2001 From: Gabriel Souza Franco Date: Thu, 3 Dec 2020 14:30:07 -0300 Subject: [PATCH] Add window id to failed pixmap request debug msg --- scene.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scene.cpp b/scene.cpp index 3728cfe03d..1c065f7787 100644 --- a/scene.cpp +++ b/scene.cpp @@ -1248,20 +1248,23 @@ void WindowPixmap::create() Xcb::WindowAttributes windowAttributes(toplevel()->frameId()); Xcb::WindowGeometry windowGeometry(toplevel()->frameId()); if (xcb_generic_error_t *error = xcb_request_check(connection(), namePixmapCookie)) { - qCDebug(KWIN_CORE) << "Creating window pixmap failed: " << error->error_code; + qCDebug(KWIN_CORE, "Failed to create window pixmap for window 0x%x (error code %d)", + toplevel()->window(), error->error_code); free(error); return; } // check that the received pixmap is valid and actually matches what we // know about the window (i.e. size) if (!windowAttributes || windowAttributes->map_state != XCB_MAP_STATE_VIEWABLE) { - qCDebug(KWIN_CORE) << "Creating window pixmap failed: " << this; + qCDebug(KWIN_CORE, "Failed to create window pixmap for window 0x%x (not viewable)", + toplevel()->window()); xcb_free_pixmap(connection(), pix); return; } const QRect bufferGeometry = toplevel()->bufferGeometry(); if (windowGeometry.size() != bufferGeometry.size()) { - qCDebug(KWIN_CORE) << "Creating window pixmap failed: " << this; + qCDebug(KWIN_CORE, "Failed to create window pixmap for window 0x%x (mismatched geometry)", + toplevel()->window()); xcb_free_pixmap(connection(), pix); return; }