mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-15 02:30:11 -08:00
os/gfx/linux: window focus querying
This commit is contained in:
1 parent
d564184d31
commit
bc75635a65
1 file changed
+6
-2
@@ -204,8 +204,12 @@ internal B32
|
||||
os_window_is_focused(OS_Handle handle)
|
||||
{
|
||||
if(os_handle_match(handle, os_handle_zero())) {return 0;}
|
||||
// TODO(rjf)
|
||||
return 0;
|
||||
OS_LNX_Window *w = (OS_LNX_Window *)handle.u64[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
|
||||
|
||||
Reference in new issue
Block a user