mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Track keyboard focus on Wayland.
This commit is contained in:
parent
2f8fe4180d
commit
767f7e4fd4
@ -203,6 +203,7 @@ static struct xkb_compose_state* s_xkbComposeState;
|
||||
static xkb_mod_index_t s_xkbCtrl, s_xkbAlt, s_xkbShift, s_xkbSuper;
|
||||
static wp_cursor_shape_device_v1_shape s_mouseCursor;
|
||||
static uint32_t s_mouseCursorSerial;
|
||||
static bool s_hasFocus = false;
|
||||
|
||||
struct Output
|
||||
{
|
||||
@ -381,11 +382,13 @@ 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 );
|
||||
s_hasFocus = true;
|
||||
}
|
||||
|
||||
static void KeyboardLeave( void*, struct wl_keyboard* kbd, uint32_t serial, struct wl_surface* surf )
|
||||
{
|
||||
ImGui::GetIO().AddFocusEvent( false );
|
||||
s_hasFocus = false;
|
||||
}
|
||||
|
||||
static xkb_keysym_t Compose( const xkb_keysym_t sym )
|
||||
|
Loading…
x
Reference in New Issue
Block a user