When we get randr events, check for actual config differences.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84223
This commit is contained in:
Christopher Michael 2013-02-19 11:00:59 +00:00 committed by Christopher Michael
parent 8f728d158d
commit 059a0198c3
1 changed files with 28 additions and 11 deletions

View File

@ -493,6 +493,13 @@ _e_randr_event_cb_crtc_change(void *data EINA_UNUSED, int type EINA_UNUSED, void
EINA_LIST_FOREACH(e_randr_cfg->crtcs, l, crtc_cfg)
{
if (crtc_cfg->xid == ev->crtc)
{
if ((crtc_cfg->x != ev->geo.x) ||
(crtc_cfg->y != ev->geo.y) ||
(crtc_cfg->width != ev->geo.w) ||
(crtc_cfg->height != ev->geo.h) ||
(crtc_cfg->orient != ev->orientation) ||
(crtc_cfg->mode != ev->mode))
{
crtc_cfg->x = ev->geo.x;
crtc_cfg->y = ev->geo.y;
@ -502,6 +509,8 @@ _e_randr_event_cb_crtc_change(void *data EINA_UNUSED, int type EINA_UNUSED, void
crtc_cfg->mode = ev->mode;
changed = EINA_TRUE;
}
break;
}
}
@ -545,12 +554,20 @@ _e_randr_event_cb_output_change(void *data EINA_UNUSED, int type EINA_UNUSED, vo
EINA_LIST_FOREACH(crtc_cfg->outputs, o, output_cfg)
{
if (output_cfg->xid == ev->output)
{
Eina_Bool connected = EINA_FALSE;
connected = ((ev->connection) ? EINA_FALSE : EINA_TRUE);
if ((output_cfg->crtc != ev->crtc) ||
(output_cfg->connected != connected))
{
output_cfg->crtc = ev->crtc;
output_cfg->connected =
((ev->connection) ? EINA_FALSE : EINA_TRUE);
output_cfg->connected = connected;
changed = EINA_TRUE;
}
break;
}
}