when backlight devices change, ensure they are restored to normal level

this ensures things like on login e setsup backlights fine - also on
monitor add/plug-in as when e's backlight init happens it may not see
all screens or devices yet.
This commit is contained in:
Carsten Haitzler 2020-02-07 10:49:15 +00:00
parent ee59cec585
commit 78b73fb1a7
1 changed files with 2 additions and 1 deletions

View File

@ -309,6 +309,7 @@ _backlight_devices_pending_done(void)
{ {
_devices_pending_ops--; _devices_pending_ops--;
if (_devices_pending_ops > 0) return; if (_devices_pending_ops > 0) return;
e_backlight_level_set(NULL, e_config->backlight.normal, -1.0);
_backlight_devices_update(); _backlight_devices_update();
} }
@ -592,7 +593,7 @@ e_backlight_init(void)
H(E_EVENT_ZONE_UNSTOW, _cb_handler_zone_change); H(E_EVENT_ZONE_UNSTOW, _cb_handler_zone_change);
e_backlight_update(); e_backlight_update();
if (!getenv("E_RESTART")) if (!getenv("E_RESTART"))
e_backlight_level_set(NULL, e_config->backlight.normal, 0.0); e_backlight_level_set(NULL, e_config->backlight.normal, -1.0);
return 1; return 1;
} }