mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 13:28:40 +00:00
os/gfx/linux: window focus querying
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user