mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-12-25 06:00:13 +00:00
[client] add new option input:captureOnFocus
This option allows the client to automatically enter capture mode if the window is focused. Closes #1088
This commit is contained in:
@@ -95,6 +95,9 @@ void app_updateCursorPos(double x, double y)
|
||||
|
||||
void app_handleFocusEvent(bool focused)
|
||||
{
|
||||
if (g_state.focused == focused)
|
||||
return;
|
||||
|
||||
g_state.focused = focused;
|
||||
|
||||
// release any imgui buttons/keys if we lost focus
|
||||
@@ -126,6 +129,9 @@ void app_handleFocusEvent(bool focused)
|
||||
if (g_params.minimizeOnFocusLoss)
|
||||
g_state.ds->minimize();
|
||||
}
|
||||
else
|
||||
if (g_params.captureOnFocus)
|
||||
core_setGrab(true);
|
||||
|
||||
g_cursor.realign = true;
|
||||
g_state.ds->realignPointer();
|
||||
|
||||
Reference in New Issue
Block a user