aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-04 13:37:30 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-03-04 13:37:30 -0500
commitfaf6d4f4256dd644a24aa1f24589df8f3b5f67ff (patch)
tree6939b51242ce31e01ae03bd63b16c2d56feda992 /src/lib/elementary/efl_ui_win.c
parentefl.ui.win: remove all legacy types and functions from eo file (diff)
downloadefl-faf6d4f4256dd644a24aa1f24589df8f3b5f67ff.tar.gz
efl.ui.win: remove keygrab set/unset from eo api
Summary: this is fundamentally incompatible with many display servers and will not ever be supported outside of legacy ref https://phab.enlightenment.org/T7511 Depends on https://phab.enlightenment.org/D8083 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: https://phab.enlightenment.org/T7511 Differential Revision: https://phab.enlightenment.org/D8084
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c107
1 files changed, 43 insertions, 64 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index f29365d485..43ecc9d864 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -6942,62 +6942,6 @@ _efl_ui_win_prop_focus_skip_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_B
TRAP(sd, focus_skip_set, skip);
}
-EOLIAN static Eina_Bool
-_efl_ui_win_keygrab_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *key,
- Efl_Input_Modifier modifiers EINA_UNUSED,
- Efl_Input_Modifier not_modifiers EINA_UNUSED,
- int priority EINA_UNUSED, Efl_Ui_Win_Keygrab_Mode grab_mode)
-{
- Eina_Bool ret = EINA_FALSE;
-#ifdef HAVE_ELEMENTARY_X
- _internal_elm_win_xwindow_get(sd);
- if (sd->x.xwin)
- {
- Ecore_X_Win_Keygrab_Mode x_grab_mode;
- switch (grab_mode)
- {
- case ELM_WIN_KEYGRAB_SHARED:
- x_grab_mode = ECORE_X_WIN_KEYGRAB_SHARED;
- break;
- case ELM_WIN_KEYGRAB_TOPMOST:
- x_grab_mode = ECORE_X_WIN_KEYGRAB_TOPMOST;
- break;
- case ELM_WIN_KEYGRAB_EXCLUSIVE:
- x_grab_mode = ECORE_X_WIN_KEYGRAB_EXCLUSIVE;
- break;
- case ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE:
- x_grab_mode = ECORE_X_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE;
- break;
- default:
- return ret;
- }
- ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, x_grab_mode);
- }
-#else
- (void)sd;
- (void)key;
- (void)grab_mode;
-#endif
- return ret;
-}
-
-EOLIAN static Eina_Bool
-_efl_ui_win_keygrab_unset(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *key,
- Efl_Input_Modifier modifiers EINA_UNUSED,
- Efl_Input_Modifier not_modifiers EINA_UNUSED)
-{
- Eina_Bool ret = EINA_FALSE;
-#ifdef HAVE_ELEMENTARY_X
- _internal_elm_win_xwindow_get(sd);
- if (sd->x.xwin)
- ret = ecore_x_window_keygrab_unset(sd->x.xwin, key, 0, 0);
-#else
- (void)sd;
- (void)key;
-#endif
- return ret;
-}
-
EOLIAN static void
_efl_ui_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled)
{
@@ -8901,13 +8845,40 @@ EAPI Eina_Bool
elm_win_keygrab_set(Elm_Win *obj, const char *key,
Evas_Modifier_Mask modifiers EINA_UNUSED,
Evas_Modifier_Mask not_modifiers EINA_UNUSED,
- int priority, Elm_Win_Keygrab_Mode grab_mode)
+ int priority EINA_UNUSED, Elm_Win_Keygrab_Mode grab_mode)
{
// Note: Not converting modifiers as they are not used in the implementation
- return efl_ui_win_keygrab_set(obj, key,
- EFL_INPUT_MODIFIER_NONE,
- EFL_INPUT_MODIFIER_NONE,
- priority, grab_mode);
+ Eina_Bool ret = EINA_FALSE;
+#ifdef HAVE_ELEMENTARY_X
+ Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+ _internal_elm_win_xwindow_get(sd);
+ if (sd->x.xwin)
+ {
+ Ecore_X_Win_Keygrab_Mode x_grab_mode;
+ switch (grab_mode)
+ {
+ case ELM_WIN_KEYGRAB_SHARED:
+ x_grab_mode = ECORE_X_WIN_KEYGRAB_SHARED;
+ break;
+ case ELM_WIN_KEYGRAB_TOPMOST:
+ x_grab_mode = ECORE_X_WIN_KEYGRAB_TOPMOST;
+ break;
+ case ELM_WIN_KEYGRAB_EXCLUSIVE:
+ x_grab_mode = ECORE_X_WIN_KEYGRAB_EXCLUSIVE;
+ break;
+ case ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE:
+ x_grab_mode = ECORE_X_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE;
+ break;
+ default:
+ return ret;
+ }
+ ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, x_grab_mode);
+ }
+#else
+ (void)key;
+ (void)grab_mode;
+#endif
+ return ret;
}
EAPI Eina_Bool
@@ -8916,9 +8887,17 @@ elm_win_keygrab_unset(Elm_Win *obj, const char *key,
Evas_Modifier_Mask not_modifiers EINA_UNUSED)
{
// Note: Not converting modifiers as they are not used in the implementation
- return efl_ui_win_keygrab_unset(obj, key,
- EFL_INPUT_MODIFIER_NONE,
- EFL_INPUT_MODIFIER_NONE);
+ Eina_Bool ret = EINA_FALSE;
+#ifdef HAVE_ELEMENTARY_X
+ Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+ _internal_elm_win_xwindow_get(sd);
+ if (sd->x.xwin)
+ ret = ecore_x_window_keygrab_unset(sd->x.xwin, key, 0, 0);
+#else
+ (void)sd;
+ (void)key;
+#endif
+ return ret;
}
EAPI Eina_Bool