mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-03-06 16:50:50 +00:00
[client] main: make activation requests optional
This commit is contained in:
parent
82607a7d6f
commit
9cadb64942
3 changed files with 34 additions and 23 deletions
|
@ -295,6 +295,13 @@ static struct Option options[] =
|
||||||
.type = OPTION_TYPE_BOOL,
|
.type = OPTION_TYPE_BOOL,
|
||||||
.value.x_bool = false,
|
.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
|
// input options
|
||||||
{
|
{
|
||||||
|
@ -655,6 +662,7 @@ bool config_load(int argc, char * argv[])
|
||||||
g_params.uiFont = option_get_string("win", "uiFont" );
|
g_params.uiFont = option_get_string("win", "uiFont" );
|
||||||
g_params.uiSize = option_get_int ("win", "uiSize" );
|
g_params.uiSize = option_get_int ("win", "uiSize" );
|
||||||
g_params.jitRender = option_get_bool ("win", "jitRender" );
|
g_params.jitRender = option_get_bool ("win", "jitRender" );
|
||||||
|
g_params.requestActivation = option_get_bool ("win", "requestActivation" );
|
||||||
|
|
||||||
if (g_params.noScreensaver && g_params.autoScreensaver)
|
if (g_params.noScreensaver && g_params.autoScreensaver)
|
||||||
{
|
{
|
||||||
|
|
|
@ -569,6 +569,7 @@ int main_frameThread(void * unused)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_params.requestActivation)
|
||||||
g_state.ds->requestActivation();
|
g_state.ds->requestActivation();
|
||||||
|
|
||||||
while(g_state.state == APP_STATE_RUNNING && !g_state.stopVideo)
|
while(g_state.state == APP_STATE_RUNNING && !g_state.stopVideo)
|
||||||
|
@ -782,7 +783,8 @@ int main_frameThread(void * unused)
|
||||||
|
|
||||||
overlaySplash_show(false);
|
overlaySplash_show(false);
|
||||||
|
|
||||||
if (frame->flags & FRAME_FLAG_REQUEST_ACTIVATION)
|
if (frame->flags & FRAME_FLAG_REQUEST_ACTIVATION &&
|
||||||
|
g_params.requestActivation)
|
||||||
g_state.ds->requestActivation();
|
g_state.ds->requestActivation();
|
||||||
|
|
||||||
const bool blockScreensaver = frame->flags & FRAME_FLAG_BLOCK_SCREENSAVER;
|
const bool blockScreensaver = frame->flags & FRAME_FLAG_BLOCK_SCREENSAVER;
|
||||||
|
|
|
@ -201,6 +201,7 @@ struct AppParams
|
||||||
const char * uiFont;
|
const char * uiFont;
|
||||||
int uiSize;
|
int uiSize;
|
||||||
bool jitRender;
|
bool jitRender;
|
||||||
|
bool requestActivation;
|
||||||
|
|
||||||
unsigned int cursorPollInterval;
|
unsigned int cursorPollInterval;
|
||||||
unsigned int framePollInterval;
|
unsigned int framePollInterval;
|
||||||
|
|
Loading…
Add table
Reference in a new issue