forked from enlightenment/efl
ecore/wayland: Add ecore_wl_window_keyboard_get().
Instead of use direct access to the Ecore_Wl_Window structure, just use the getter, so we can hide the internals.
This commit is contained in:
parent
8b852ad21e
commit
b77ac9b57e
|
@ -633,6 +633,8 @@ EAPI int ecore_wl_window_id_get(Ecore_Wl_Window *win);
|
|||
EAPI void ecore_wl_window_title_set(Ecore_Wl_Window *win, const char *title);
|
||||
EAPI void ecore_wl_window_class_name_set(Ecore_Wl_Window *win, const char *class_name);
|
||||
|
||||
EAPI Ecore_Wl_Input *ecore_wl_window_keyboard_get(Ecore_Wl_Window *win);
|
||||
|
||||
/**
|
||||
* Returns a wl_surface with no association to any wl_shell_surface.
|
||||
*
|
||||
|
|
|
@ -714,6 +714,17 @@ ecore_wl_window_class_name_set(Ecore_Wl_Window *win, const char *class_name)
|
|||
wl_shell_surface_set_class(win->shell_surface, win->class_name);
|
||||
}
|
||||
|
||||
/* @since 1.8 */
|
||||
/* Maybe we need an ecore_wl_window_pointer_get() too */
|
||||
EAPI Ecore_Wl_Input *
|
||||
ecore_wl_window_keyboard_get(Ecore_Wl_Window *win)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
if (!win) return 0;
|
||||
return win->keyboard_device;
|
||||
}
|
||||
|
||||
|
||||
/* local functions */
|
||||
static void
|
||||
|
|
|
@ -625,7 +625,7 @@ wayland_im_context_focus_in(Ecore_IMF_Context *ctx)
|
|||
|
||||
if (!imcontext->window) return;
|
||||
|
||||
input = imcontext->window->keyboard_device;
|
||||
input = ecore_wl_window_keyboard_get(imcontext->window);
|
||||
if (!input)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue