Add debug print for focus change events

This commit is contained in:
Kovid Goyal 2023-03-10 17:09:11 +05:30
parent 34cbf5ceac
commit ffa8c1c498
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -435,6 +435,9 @@ static id_type focus_counter = 0;
static void
window_focus_callback(GLFWwindow *w, int focused) {
if (!set_callback_window(w)) return;
if (OPT(debug_keyboard)) {
fprintf(stderr, "\x1b[35mon_focus_change\x1b[m: window id: 0x%llu focused: %d\n", global_state.callback_os_window->id, focused);
}
// There exist some numbnut Wayland compositors, like kwin, that send mouse
// press events before focus gained events. So only clear the active drag
// window if it is not the focused window. See https://github.com/kovidgoyal/kitty/issues/6095