os/gfx/linux: window focus querying

This commit is contained in:
Ryan Fleury
2025-05-12 21:22:03 -07:00
parent d564184d31
commit bc75635a65
+6 -2
View File
@@ -204,8 +204,12 @@ internal B32
os_window_is_focused(OS_Handle handle) os_window_is_focused(OS_Handle handle)
{ {
if(os_handle_match(handle, os_handle_zero())) {return 0;} if(os_handle_match(handle, os_handle_zero())) {return 0;}
// TODO(rjf) OS_LNX_Window *w = (OS_LNX_Window *)handle.u64[0];
return 0; Window focused_window = 0;
int revert_to = 0;
XGetInputFocus(os_lnx_gfx_state->display, &focused_window, &revert_to);
B32 result = (w->window == focused_window);
return result;
} }
internal B32 internal B32