Backport: 2e0f4e7
:: Reduce variable usage
Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 84186 Signed-off-by: Deon Thomas <PrinceAMD.Elive@gmail.com>
This commit is contained in:
parent
4c512aa526
commit
bda7510577
|
@ -1107,8 +1107,6 @@ _e_smart_monitor_frame_cb_rotate_stop(void *data, Evas_Object *obj EINA_UNUSED,
|
||||||
{
|
{
|
||||||
Evas_Object *mon;
|
Evas_Object *mon;
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
Ecore_X_Randr_Orientation orient;
|
|
||||||
int rotation = 0;
|
|
||||||
Evas_Coord cw = 0, ch = 0;
|
Evas_Coord cw = 0, ch = 0;
|
||||||
Evas_Coord mw = 0, mh = 0;
|
Evas_Coord mw = 0, mh = 0;
|
||||||
|
|
||||||
|
@ -1124,10 +1122,7 @@ _e_smart_monitor_frame_cb_rotate_stop(void *data, Evas_Object *obj EINA_UNUSED,
|
||||||
sd->rotating = EINA_FALSE;
|
sd->rotating = EINA_FALSE;
|
||||||
|
|
||||||
/* get current orientation based on rotation */
|
/* get current orientation based on rotation */
|
||||||
orient = _e_smart_monitor_orientation_get(sd->rotation);
|
sd->crtc.orient = _e_smart_monitor_orientation_get(sd->rotation);
|
||||||
|
|
||||||
/* update current orientation */
|
|
||||||
sd->crtc.orient = orient;
|
|
||||||
|
|
||||||
/* get the degrees of rotation based on this orient
|
/* get the degrees of rotation based on this orient
|
||||||
*
|
*
|
||||||
|
@ -1139,18 +1134,15 @@ _e_smart_monitor_frame_cb_rotate_stop(void *data, Evas_Object *obj EINA_UNUSED,
|
||||||
* EX: User manually rotates to 80 degrees. We take that 80 and
|
* EX: User manually rotates to 80 degrees. We take that 80 and
|
||||||
* factor in some fuziness to get 90 degrees. We need to take that 90
|
* factor in some fuziness to get 90 degrees. We need to take that 90
|
||||||
* and return an 'orientation' */
|
* and return an 'orientation' */
|
||||||
rotation = _e_smart_monitor_rotation_get(sd->crtc.orient);
|
sd->rotation = _e_smart_monitor_rotation_get(sd->crtc.orient);
|
||||||
|
|
||||||
/* update current rotation */
|
|
||||||
sd->rotation = rotation;
|
|
||||||
|
|
||||||
/* get current size */
|
/* get current size */
|
||||||
cw = sd->crtc.w;
|
cw = sd->crtc.w;
|
||||||
ch = sd->crtc.h;
|
ch = sd->crtc.h;
|
||||||
|
|
||||||
/* calculate new size based on orientation */
|
/* calculate new size based on orientation */
|
||||||
if ((orient == ECORE_X_RANDR_ORIENTATION_ROT_90) ||
|
if ((sd->crtc.orient == ECORE_X_RANDR_ORIENTATION_ROT_90) ||
|
||||||
(orient == ECORE_X_RANDR_ORIENTATION_ROT_270))
|
(sd->crtc.orient == ECORE_X_RANDR_ORIENTATION_ROT_270))
|
||||||
{
|
{
|
||||||
cw = sd->crtc.h;
|
cw = sd->crtc.h;
|
||||||
ch = sd->crtc.w;
|
ch = sd->crtc.w;
|
||||||
|
|
Loading…
Reference in New Issue