PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)
PKG_CHECK_MODULES(WAYLAND, [wayland-server])
PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment])
+PKG_CHECK_MODULES(EEZE, [eeze])
AC_SUBST(ENLIGHTENMENT_CFLAGS)
AC_SUBST(ENLIGHTENMENT_LIBS)
+AC_SUBST(EEZE_CFLAGS)
+AC_SUBST(EEZE_LIBS)
+
AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
AC_SUBST(dlopen_libs)
input-method-protocol.c \
text-protocol.c
module_la_LIBADD =
-module_la_CFLAGS = @WAYLAND_CFLAGS@ @ENLIGHTENMENT_CFLAGS@ -DHAVE_WAYLAND_ONLY
-module_la_LDFLAGS = -module -avoid-version @WAYLAND_LIBS@ @ENLIGHTENMENT_LIBS@
+module_la_CFLAGS = @WAYLAND_CFLAGS@ @ENLIGHTENMENT_CFLAGS@ @EEZE_CFLAGS@ -DHAVE_WAYLAND_ONLY
+module_la_LDFLAGS = -module -avoid-version @WAYLAND_LIBS@ @ENLIGHTENMENT_LIBS@ @EEZE_LIBS@
module_la_DEPENDENCIES = $(top_builddir)/config.h
BUILT_SOURCES = input-method-protocol.c \
#include "e_mod_main.h"
#include "text-protocol.h"
#include "input-method-protocol.h"
+#include "Eeze.h"
typedef struct _E_Text_Input E_Text_Input;
typedef struct _E_Text_Input_Mgr E_Text_Input_Mgr;
E_Input_Method *g_input_method;
Eina_List *shutdown_list;
+Eina_Bool g_keyboard_connecting = EINA_FALSE;
+Eeze_Udev_Watch * eeze_udev_watch_hander = NULL;
static void
_e_mod_text_input_shutdown_cb_add(void (*func)(void *data), void *data)
"No Text Input For Resource");
return;
}
-
+ if (g_keyboard_connecting == EINA_TRUE)
+ return;
text_input->input_panel_visibile = EINA_TRUE;
e_input_panel_visibility_change(EINA_TRUE);
return;
}
+ if (g_keyboard_connecting == EINA_FALSE)
+ e_input_panel_visibility_change(EINA_TRUE);
+
EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
{
if (!input_method || !input_method->context) continue;
EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Text_Input" };
+static void
+_e_mod_eeze_udev_watch_cb(const char *text, Eeze_Udev_Event event, void *data, Eeze_Udev_Watch *watch)
+{
+ if (event == EEZE_UDEV_EVENT_ADD)
+ {
+ g_keyboard_connecting = EINA_TRUE;
+ e_input_panel_visibility_change(EINA_FALSE);
+ }
+ else if (event == EEZE_UDEV_EVENT_REMOVE)
+ g_keyboard_connecting = EINA_FALSE;
+}
+
EAPI void *
e_modapi_init(E_Module *m)
{
if (!_e_text_input_manager_create(cdata))
goto err;
+ eeze_udev_watch_hander = eeze_udev_watch_add(EEZE_UDEV_TYPE_KEYBOARD,
+ EEZE_UDEV_EVENT_ADD | EEZE_UDEV_EVENT_REMOVE,
+ _e_mod_eeze_udev_watch_cb,
+ NULL);
+ if (!eeze_udev_watch_hander)
+ goto err;
+
return m;
err:
_e_mod_text_input_shutdown();
EAPI int
e_modapi_shutdown(E_Module *m EINA_UNUSED)
{
+ if (eeze_udev_watch_hander)
+ {
+ eeze_udev_watch_del(eeze_udev_watch_hander);
+ eeze_udev_watch_hander = NULL;
+ }
_e_mod_text_input_shutdown();
e_input_panel_shutdown(NULL);