#include <locale.h>
//
+#define MAX_WAIT_COUNT 20
+
typedef struct _Ecore_Wl2_Mouse_Down_Info
{
EINA_INLIST;
else set_last_result(TIZEN_ERROR_NONE);
}
+static void
+_ecore_wl2_keygrab_result_wait(Ecore_Wl2_Display *ewd)
+{
+ unsigned int wait_count = 0;
+ while ((_ecore_wl2_keygrab_error == -1) && (wait_count < MAX_WAIT_COUNT))
+ {
+ wl_display_dispatch(ewd->wl.display);
+ wait_count++;
+ }
+}
+
//I'm not sure that keygrab function should be changed to Ecore_evas_XXX.
//In the future, keyrouter feature can be added upstream or finish stabilizing.
//After that time, we maybe change API name or other thing.
/* Send sync to wayland compositor and register sync callback to exit while dispatch loop below */
ecore_wl2_display_sync(ewd);
+ _ecore_wl2_keygrab_result_wait(ewd);
+
INF("After keygrab _ecore_wl2_keygrab_error = %d", _ecore_wl2_keygrab_error);
if (!_ecore_wl2_keygrab_error)
{
/* Send sync to wayland compositor and register sync callback to exit while dispatch loop below */
ecore_wl2_display_sync(ewd);
+ _ecore_wl2_keygrab_result_wait(ewd);
+
INF("After keygrab unset _ecore_wl2_keygrab_error = %d", _ecore_wl2_keygrab_error);
if (!_ecore_wl2_keygrab_error)
{