princeamd pushed a commit to branch enlightenment-0.17.

commit f53cc4a5f2dae6cb5cf40c3d1d59da89b0b84c28
Author: Christopher Michael <[email protected]>
Date:   Tue Feb 19 10:58:01 2013 +0000

    Backport: 5b47415 :: Add code to check if rotations for a given crtc are 
possible, and disable the rotation in edje if not.
    
    Signed-off-by: Christopher Michael <[email protected]>
    
    SVN revision: 84176
    Signed-off-by: Deon Thomas <[email protected]>
---
 src/modules/conf_randr/e_smart_monitor.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/modules/conf_randr/e_smart_monitor.c 
b/src/modules/conf_randr/e_smart_monitor.c
index 70a8437..fc2c95a 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -152,6 +152,8 @@ void
 e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord 
cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch)
 {
    E_Smart_Data *sd;
+   Ecore_X_Randr_Orientation orients;
+   Ecore_X_Window root = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -172,6 +174,16 @@ e_smart_monitor_crtc_set(Evas_Object *obj, 
Ecore_X_Randr_Crtc crtc, Evas_Coord c
 
    /* set monitor resolution text */
    _e_smart_monitor_resolution_set(sd, sd->cw, sd->ch);
+
+   /* get the root window */
+   root = ecore_x_window_root_first_get();
+
+   /* get possible orientations for this crtc */
+   orients = ecore_x_randr_crtc_orientations_get(root, crtc);
+
+   /* check if orientation is possible and disable if not */
+   if (orients <= ECORE_X_RANDR_ORIENTATION_ROT_0)
+     edje_object_signal_emit(sd->o_frame, "e,state,rotate,disabled", "e");
 }
 
 void 

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to