princeamd pushed a commit to branch enlightenment-0.17.
commit 63163546d8bc2e96909f397ac83d882080c38310
Author: Christopher Michael <[email protected]>
Date: Tue Feb 19 10:58:22 2013 +0000
Backport: c2b2be5 :: Add current rotation to smart_data structure. Fill in
current rotation on crtc set. Update current rotation when we get a rotation
event.
Signed-off-by: Christopher Michael <[email protected]>
SVN revision: 84183
Signed-off-by: Deon Thomas <[email protected]>
---
src/modules/conf_randr/e_smart_monitor.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/modules/conf_randr/e_smart_monitor.c
b/src/modules/conf_randr/e_smart_monitor.c
index d4c2789..b13022a 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -80,6 +80,9 @@ struct _E_Smart_Data
/* rotating flag */
Eina_Bool rotating : 1;
+
+ /* current rotation */
+ int rotation;
};
/* smart function prototypes */
@@ -223,6 +226,9 @@ e_smart_monitor_crtc_set(Evas_Object *obj,
Ecore_X_Randr_Crtc crtc, Evas_Coord c
sd->crtc.mode = ecore_x_randr_crtc_mode_get(root, crtc);
#endif
+ /* get the degree of rotation */
+ sd->rotation = _e_smart_monitor_rotation_get(sd->crtc.orient);
+
/* check crtc current mode to determine if enabled */
if (sd->crtc.mode != 0)
{
@@ -1059,6 +1065,9 @@ _e_smart_monitor_frame_cb_rotate_start(void *data,
Evas_Object *obj EINA_UNUSED,
/* try to get the monitor smart data */
if (!(sd = evas_object_smart_data_get(mon))) return;
+ /* get the degree of rotation */
+ sd->rotation = _e_smart_monitor_rotation_get(sd->crtc.orient);
+
/* record current size of monitor */
/* evas_object_grid_pack_get(sd->grid.obj, mon, NULL, NULL, &sd->cw,
&sd->ch); */
@@ -1168,10 +1177,11 @@ _e_smart_monitor_rotate_event(E_Smart_Data *sd,
Evas_Object *mon, void *event)
if (rotation == 0) return;
/* factor in any existing rotation */
- /* rotation += ; */
+ rotation += sd->rotation;
rotation %= 360;
/* update current rotation value */
+ sd->rotation = rotation;
/* apply rotation map */
}
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev