[client] ds: add new minimize function to the ds interface

This change is to allow the application to minimize the window on focus
loss if the user's preferences are configured to do this.
This commit is contained in:
Geoffrey McRae committed 2021-05-06 22:24:42 +10:00
1 parent bdfb18299d
commit f698e4589d
3 files changed
+11 -4

No files matched your search

+7
View File
@@ -67,7 +67,11 @@ void app_handleFocusEvent(bool focused)
{
g_state.focused = focused;
if (!core_inputEnabled())
{
if (!focused && g_params.minimizeOnFocusLoss)
g_state.ds->minimize();
return;
}
if (!focused)
{
@@ -81,6 +85,9 @@ void app_handleFocusEvent(bool focused)
if (!g_params.showCursorDot)
g_state.ds->showPointer(false);
if (g_params.minimizeOnFocusLoss)
g_state.ds->minimize();
}
g_cursor.realign = true;