From 6c3a3d14d3c93bd079fd435b889bf3ca6aee0ae5 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 18 Dec 2012 15:16:39 +0000 Subject: [PATCH] Check if a monitor supports rotation (via different orientations), and if not then disable the rotate ability on the frame. Signed-off-by: Christopher Michael SVN revision: 81261 --- src/modules/conf_randr/e_smart_monitor.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c index ff1036ce7..8ef61a15a 100644 --- a/src/modules/conf_randr/e_smart_monitor.c +++ b/src/modules/conf_randr/e_smart_monitor.c @@ -349,6 +349,14 @@ e_smart_monitor_setup(Evas_Object *obj) else edje_object_signal_emit(sd->o_frame, "e,state,disabled", "e"); + /* check if rotation is supported */ + if ((sd->output) && (sd->output->crtc)) + { + /* if no rotation is supported, disable rotate in frame */ + if (sd->output->crtc->orientations <= ECORE_X_RANDR_ORIENTATION_ROT_0) + edje_object_signal_emit(sd->o_frame, "e,state,rotate_disabled", "e"); + } + /* set the 'current' values to be equal to the original ones */ sd->current.x = sd->orig.x; sd->current.y = sd->orig.y; @@ -450,6 +458,7 @@ e_smart_monitor_changes_apply(Evas_Object *obj) /* set output policy to cloned */ sd->output->policy = ECORE_X_RANDR_OUTPUT_POLICY_CLONE; + /* use the geometry from the parent (since we are cloned to it) */ e_smart_monitor_current_geometry_get(sd->parent, &crtc->geometry.x, &crtc->geometry.y, &crtc->geometry.w,