PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment])
PKG_CHECK_MODULES(EEZE, [eeze])
PKG_CHECK_MODULES(VCONF, [vconf])
+PKG_CHECK_MODULES(DLOG, [dlog])
AC_SUBST(ENLIGHTENMENT_CFLAGS)
AC_SUBST(ENLIGHTENMENT_LIBS)
#include <input-method-server-protocol.h>
#include <vconf.h>
#include <vconf-keys.h>
-#include "Eeze.h"
+#include <Eeze.h>
+#include <Ecore_Wayland.h>
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "WL_TEXTINPUT"
static Eina_Bool _e_text_input_method_context_cb_client_resize(void *data EINA_UNUSED, int type, void *event);
static void set_soft_keyboard_mode();
}
}
+static void
+_e_text_input_cb_get_hide_permission(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
+{
+ E_Text_Input *text_input = wl_resource_get_user_data(resource);
+ uint32_t permission = 1;
+ E_Client *ec = NULL;
+
+ if (!text_input)
+ {
+ wl_resource_post_error(resource,
+ WL_DISPLAY_ERROR_INVALID_OBJECT,
+ "No Text Input For Resource");
+ return;
+ }
+
+ ec = e_client_focused_get();
+ if (ec)
+ {
+ E_Window_Type focus_win_type = ec->netwm.type;
+ LOGD("Window ID : 0x%08x, Name : %s, type : %d\n", (unsigned int)e_client_util_win_get(ec), (char *)e_client_util_name_get(ec), focus_win_type);
+
+ if (focus_win_type == E_WINDOW_TYPE_NOTIFICATION ||
+ focus_win_type == E_WINDOW_TYPE_POPUP_MENU)
+ permission = 0;
+ }
+ else
+ {
+ LOGD("Can't get focus window\n");
+ }
+
+ if (text_input->resource)
+ wl_text_input_send_hide_permission(text_input->resource, permission);
+}
+
static const struct wl_text_input_interface _e_text_input_implementation = {
_e_text_input_cb_activate,
_e_text_input_cb_deactivate,
_e_text_input_cb_cursor_position_set,
_e_text_input_cb_process_input_device_event,
_e_text_input_cb_filter_key_event,
- _e_text_input_cb_reset_sync
+ _e_text_input_cb_reset_sync,
+ _e_text_input_cb_get_hide_permission
};
static void