aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2013-02-19 11:00:59 +0000
committerChristopher Michael <cpmichael1@comcast.net>2013-02-19 11:00:59 +0000
commit059a0198c307ee754ea0ea8100740b26a89f5247 (patch)
treee62bdc84825abf88e97983f5a96d90f7903a2767 /src
parent8f728d158d1373cb6ac2d73b27ff11478555c6d0 (diff)
downloadenlightenment-059a0198c307ee754ea0ea8100740b26a89f5247.tar.gz
enlightenment-059a0198c307ee754ea0ea8100740b26a89f5247.tar.xz
enlightenment-059a0198c307ee754ea0ea8100740b26a89f5247.zip
When we get randr events, check for actual config differences.
Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 84223
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_randr.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/src/bin/e_randr.c b/src/bin/e_randr.c
index 759c6dae1..cc0f72971 100644
--- a/src/bin/e_randr.c
+++ b/src/bin/e_randr.c
@@ -494,14 +494,23 @@ _e_randr_event_cb_crtc_change(void *data EINA_UNUSED, int type EINA_UNUSED, void
{
if (crtc_cfg->xid == ev->crtc)
{
- 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;
+ 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;
+ crtc_cfg->width = ev->geo.w;
+ crtc_cfg->height = ev->geo.h;
+ crtc_cfg->orient = ev->orientation;
+ crtc_cfg->mode = ev->mode;
+
+ changed = EINA_TRUE;
+ }
- changed = EINA_TRUE;
break;
}
}
@@ -546,11 +555,19 @@ _e_randr_event_cb_output_change(void *data EINA_UNUSED, int type EINA_UNUSED, vo
{
if (output_cfg->xid == ev->output)
{
- output_cfg->crtc = ev->crtc;
- output_cfg->connected =
- ((ev->connection) ? EINA_FALSE : EINA_TRUE);
+ 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 = connected;
+
+ changed = EINA_TRUE;
+ }
- changed = EINA_TRUE;
break;
}
}