xray_trigger: make initial state configurable

This commit is contained in:
Norman Feske 2017-09-07 15:14:42 +02:00 committed by Christian Helmuth
parent 0574cdf705
commit d9d32847b1
1 changed files with 10 additions and 0 deletions

View File

@ -72,6 +72,8 @@ struct Xray_trigger::Main
*/
bool _key_xray = false;
bool _key_xray_initialized = false;
/**
* X-Ray criterion depending on hovered domain
*/
@ -209,6 +211,14 @@ void Xray_trigger::Main::_handle_update()
{
_config.update();
/* define initial state once */
if (!_key_xray_initialized) {
_key_xray = _config.xml().attribute_value("initial", false);
_key_xray_initialized = true;
_timer.trigger_once(10000);
}
/* remember X-Ray mode prior applying the changes */
bool const orig_xray = _xray();