mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Unify enter/focus event tracing
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
#include <boost/container/small_vector.hpp>
|
#include <boost/container/small_vector.hpp>
|
||||||
|
|
||||||
using namespace std::literals::chrono_literals;
|
using namespace std::literals::chrono_literals;
|
||||||
|
using namespace std::literals::string_literals;
|
||||||
|
|
||||||
// A catchable alternative to `assert()`. Normally all of our `assert(!error)`
|
// A catchable alternative to `assert()`. Normally all of our `assert(!error)`
|
||||||
// should never fail, except for when Ardour hides the editor window without
|
// should never fail, except for when Ardour hides the editor window without
|
||||||
@@ -548,18 +549,12 @@ void Editor::handle_x11_events() noexcept {
|
|||||||
: reinterpret_cast<xcb_focus_in_event_t*>(
|
: reinterpret_cast<xcb_focus_in_event_t*>(
|
||||||
generic_event.get())
|
generic_event.get())
|
||||||
->event;
|
->event;
|
||||||
|
logger.log_editor_trace([&]() {
|
||||||
if (event_type == XCB_ENTER_NOTIFY) {
|
return "DEBUG: "s +
|
||||||
logger.log_editor_trace([&]() {
|
(event_type == XCB_ENTER_NOTIFY ? "EnterNotify"
|
||||||
return "DEBUG: EnterNotify for window " +
|
: "FocusIn") +
|
||||||
std::to_string(window);
|
" for window " + std::to_string(window);
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
logger.log_editor_trace([&]() {
|
|
||||||
return "DEBUG: FocusIn for window " +
|
|
||||||
std::to_string(window);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window == parent_window ||
|
if (window == parent_window ||
|
||||||
window == wrapper_window.window) {
|
window == wrapper_window.window) {
|
||||||
|
|||||||
Reference in New Issue
Block a user