forked from enlightenment/enlightenment
If a monitor is disabled by the user, then we need to set number of
outputs to zero, and free any allocated outputs before trying to apply settings. Also, check for valid mode (not 0) before trying to fetch mode_info. Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
9080e82ec4
commit
bba201a892
|
@ -807,7 +807,12 @@ e_smart_monitor_changes_apply(Evas_Object *obj)
|
||||||
|
|
||||||
/* record current values */
|
/* record current values */
|
||||||
mode = sd->current.mode;
|
mode = sd->current.mode;
|
||||||
if (!sd->current.enabled) mode = 0;
|
if (!sd->current.enabled)
|
||||||
|
{
|
||||||
|
mode = 0;
|
||||||
|
noutputs = 0;
|
||||||
|
free(outputs);
|
||||||
|
}
|
||||||
|
|
||||||
cx = sd->current.x;
|
cx = sd->current.x;
|
||||||
cy = sd->current.y;
|
cy = sd->current.y;
|
||||||
|
@ -852,7 +857,7 @@ e_smart_monitor_changes_apply(Evas_Object *obj)
|
||||||
sd->crtc.orient = orient;
|
sd->crtc.orient = orient;
|
||||||
sd->crtc.enabled = sd->current.enabled;
|
sd->crtc.enabled = sd->current.enabled;
|
||||||
|
|
||||||
if ((mode_info = ecore_x_randr_mode_info_get(root, sd->crtc.mode)))
|
if ((sd->crtc.mode) && (mode_info = ecore_x_randr_mode_info_get(root, sd->crtc.mode)))
|
||||||
{
|
{
|
||||||
sd->crtc.refresh_rate =
|
sd->crtc.refresh_rate =
|
||||||
_e_smart_monitor_mode_refresh_rate_get(mode_info);
|
_e_smart_monitor_mode_refresh_rate_get(mode_info);
|
||||||
|
|
Loading…
Reference in New Issue