From d522e57a8a8d4eccaf76016aa3f7b1853806343a Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 26 Jul 2021 12:40:31 +0200 Subject: [PATCH] Add active window to enter/leave/focus tracing --- src/wine-host/editor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/wine-host/editor.cpp b/src/wine-host/editor.cpp index 2110e9e8..2f281e73 100644 --- a/src/wine-host/editor.cpp +++ b/src/wine-host/editor.cpp @@ -556,7 +556,11 @@ void Editor::handle_x11_events() noexcept { return "DEBUG: "s + (event_type == XCB_ENTER_NOTIFY ? "EnterNotify" : "FocusIn") + - " for window " + std::to_string(window); + " for window " + std::to_string(window) + + " (wine window " + + (is_wine_window_active() ? "active" + : "inactive") + + ")"; }); if (window == parent_window || @@ -589,7 +593,11 @@ void Editor::handle_x11_events() noexcept { generic_event.get()); logger.log_editor_trace([&]() { return "DEBUG: LeaveNotify for window " + - std::to_string(event->child); + std::to_string(event->child) + " (wine window " + + (is_wine_window_active() ? "active" + : "inactive") + + ", detail " + std::to_string(event->detail) + + ")"; }); // This extra check for the `NonlinearVirtual` detail is