From f60b33916b31a30b114256364ba8de452cbcfa25 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Wed, 29 May 2013 15:04:57 +0900 Subject: [PATCH] When there is no current angle among the available rotation angles, set the angle that has first index among the available rotation angles. Change-Id: I668a8b93d7782721a3b766d82a3aef4a3dbd9ae4 --- src/bin/e_border.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 5c56787..00cf0ef 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -7872,8 +7872,10 @@ _e_border_rotation_get(E_Border *bd, int base_ang) { int ang = -1; + int current_ang = bd->client.e.state.rot.curr; unsigned int i; Eina_Bool found = EINA_FALSE; + Eina_Bool found_curr_ang = EINA_FALSE; if (!e_config->wm_win_rotation) return ang; if (!bd->client.e.state.rot.app_set) return ang; @@ -7894,6 +7896,8 @@ _e_border_rotation_get(E_Border *bd, found = EINA_TRUE; break; } + if (bd->client.e.state.rot.available_rots[i] == current_ang) + found_curr_ang = EINA_TRUE; } /* do nothing. this window wants to maintain current state. @@ -7903,7 +7907,7 @@ _e_border_rotation_get(E_Border *bd, */ if (!found) { - if (bd->client.e.state.rot.curr != -1) + if ((bd->client.e.state.rot.curr != -1) && (found_curr_ang)) ang = bd->client.e.state.rot.curr; else ang = bd->client.e.state.rot.available_rots[0]; -- 2.7.4