mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-26 00:26:32 +00:00
[client] main: make activation requests optional
This commit is contained in:
parent
82607a7d6f
commit
9cadb64942
@ -295,6 +295,13 @@ static struct Option options[] =
|
||||
.type = OPTION_TYPE_BOOL,
|
||||
.value.x_bool = false,
|
||||
},
|
||||
{
|
||||
.module = "win",
|
||||
.name = "requestActivation",
|
||||
.description = "Request activation when attention is needed",
|
||||
.type = OPTION_TYPE_BOOL,
|
||||
.value.x_bool = true
|
||||
},
|
||||
|
||||
// input options
|
||||
{
|
||||
@ -655,6 +662,7 @@ bool config_load(int argc, char * argv[])
|
||||
g_params.uiFont = option_get_string("win", "uiFont" );
|
||||
g_params.uiSize = option_get_int ("win", "uiSize" );
|
||||
g_params.jitRender = option_get_bool ("win", "jitRender" );
|
||||
g_params.requestActivation = option_get_bool ("win", "requestActivation" );
|
||||
|
||||
if (g_params.noScreensaver && g_params.autoScreensaver)
|
||||
{
|
||||
|
@ -569,6 +569,7 @@ int main_frameThread(void * unused)
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_params.requestActivation)
|
||||
g_state.ds->requestActivation();
|
||||
|
||||
while(g_state.state == APP_STATE_RUNNING && !g_state.stopVideo)
|
||||
@ -782,7 +783,8 @@ int main_frameThread(void * unused)
|
||||
|
||||
overlaySplash_show(false);
|
||||
|
||||
if (frame->flags & FRAME_FLAG_REQUEST_ACTIVATION)
|
||||
if (frame->flags & FRAME_FLAG_REQUEST_ACTIVATION &&
|
||||
g_params.requestActivation)
|
||||
g_state.ds->requestActivation();
|
||||
|
||||
const bool blockScreensaver = frame->flags & FRAME_FLAG_BLOCK_SCREENSAVER;
|
||||
|
@ -201,6 +201,7 @@ struct AppParams
|
||||
const char * uiFont;
|
||||
int uiSize;
|
||||
bool jitRender;
|
||||
bool requestActivation;
|
||||
|
||||
unsigned int cursorPollInterval;
|
||||
unsigned int framePollInterval;
|
||||
|
Loading…
x
Reference in New Issue
Block a user