From 0831b3f301ce6dd165d6bb4fa513d92322c60d5e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 20 Dec 2022 17:11:15 +0100 Subject: [PATCH] Push focus events to ImGui. --- profiler/src/BackendWayland.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profiler/src/BackendWayland.cpp b/profiler/src/BackendWayland.cpp index dd206a99..4ffb96ea 100644 --- a/profiler/src/BackendWayland.cpp +++ b/profiler/src/BackendWayland.cpp @@ -179,10 +179,12 @@ static void KeyboardKeymap( void*, struct wl_keyboard* kbd, uint32_t format, int static void KeyboardEnter( void*, struct wl_keyboard* kbd, uint32_t serial, struct wl_surface* surf, struct wl_array* keys ) { + ImGui::GetIO().AddFocusEvent( true ); } static void KeyboardLeave( void*, struct wl_keyboard* kbd, uint32_t serial, struct wl_surface* surf ) { + ImGui::GetIO().AddFocusEvent( false ); } static void KeyboardKey( void*, struct wl_keyboard* kbd, uint32_t serial, uint32_t time, uint32_t key, uint32_t state )