summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2015-06-12 11:16:25 +0900
committerJi-Youn Park <jy0703.park@samsung.com>2015-06-12 11:16:25 +0900
commitb4575e7bd21d190b691b16c61193b3cbdfc5f3e5 (patch)
tree6cd32721abd7fe5fd2a924b96e9a3a5499462161
parent420ed89d8650ed1701f9ec5c0ddbe724a6dc5a53 (diff)
elm_win: fix keygrab bug to use wrong keygrab mode
The code set worng ecore_x_keygrab mode according keygrab mode. and changed some codes for readablity.
-rw-r--r--src/lib/elm_win.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index b63b2b1c4..d81226ff1 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -5044,19 +5044,28 @@ _elm_win_keygrab_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *key, Eva
5044 _internal_elm_win_xwindow_get(sd); 5044 _internal_elm_win_xwindow_get(sd);
5045 if (sd->x.xwin) 5045 if (sd->x.xwin)
5046 { 5046 {
5047 if (grab_mode == ELM_WIN_KEYGRAB_SHARED) 5047 Ecore_X_Win_Keygrab_Mode x_grab_mode;
5048 ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, ECORE_X_WIN_KEYGRAB_SHARED); 5048 switch (grab_mode)
5049 else if (grab_mode == ELM_WIN_KEYGRAB_TOPMOST) 5049 {
5050 ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, ECORE_X_WIN_KEYGRAB_TOPMOST); 5050 case ELM_WIN_KEYGRAB_SHARED:
5051 else if (grab_mode == ELM_WIN_KEYGRAB_EXCLUSIVE) 5051 x_grab_mode = ECORE_X_WIN_KEYGRAB_SHARED;
5052 ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, ECORE_X_WIN_KEYGRAB_EXCLUSIVE); 5052 break;
5053 else if (grab_mode == ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE) 5053 case ELM_WIN_KEYGRAB_TOPMOST:
5054 ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, ECORE_X_WIN_KEYGRAB_EXCLUSIVE); 5054 x_grab_mode = ECORE_X_WIN_KEYGRAB_TOPMOST;
5055 break;
5056 case ELM_WIN_KEYGRAB_EXCLUSIVE:
5057 x_grab_mode = ECORE_X_WIN_KEYGRAB_EXCLUSIVE;
5058 break;
5059 case ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE:
5060 x_grab_mode = ECORE_X_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE;
5061 break;
5062 default:
5063 return ret;
5064 }
5065 ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, x_grab_mode);
5055 } 5066 }
5056 return ret;
5057#else
5058 return ret;
5059#endif 5067#endif
5068 return ret;
5060} 5069}
5061 5070
5062EOLIAN static Eina_Bool 5071EOLIAN static Eina_Bool
@@ -5067,10 +5076,8 @@ _elm_win_keygrab_unset(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *key, E
5067 _internal_elm_win_xwindow_get(sd); 5076 _internal_elm_win_xwindow_get(sd);
5068 if (sd->x.xwin) 5077 if (sd->x.xwin)
5069 ret = ecore_x_window_keygrab_unset(sd->x.xwin, key, 0, 0); 5078 ret = ecore_x_window_keygrab_unset(sd->x.xwin, key, 0, 0);
5070 return ret;
5071#else
5072 return ret;
5073#endif 5079#endif
5080 return ret;
5074} 5081}
5075 5082
5076EOLIAN static Evas_Object* 5083EOLIAN static Evas_Object*