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 <cp.michael@samsung.com>

SVN revision: 81261
This commit is contained in:
Christopher Michael 2012-12-18 15:16:39 +00:00 committed by Christopher Michael
parent 0b296b151e
commit 6c3a3d14d3
1 changed files with 9 additions and 0 deletions

View File

@ -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,