Fix parameter of ecore_wl_window_keyboard_state_set().
Also clipboard and indicator is fixed, too.
Change-Id: Ib2d2531b7b475b1e3b505fda4f2280881699e1c9
EAPI void ecore_wl_window_clipboard_geometry_set(Ecore_Wl_Window *win, int x, int y, int w, int h);
EAPI Eina_Bool ecore_wl_window_clipboard_geometry_get(Ecore_Wl_Window *win, int *x, int *y, int *w, int *h);
-EAPI void ecore_wl_window_clipboard_state_set(Ecore_Wl_Window *win, Eina_Bool on);
+EAPI void ecore_wl_window_clipboard_state_set(Ecore_Wl_Window *win, Ecore_Wl_Clipboard_State state);
EAPI Ecore_Wl_Clipboard_State ecore_wl_window_clipboard_state_get(Ecore_Wl_Window *win);
EAPI void ecore_wl_window_keyboard_geometry_set(Ecore_Wl_Window *win, int x, int y, int w, int h);
EAPI Eina_Bool ecore_wl_window_keyboard_geometry_get(Ecore_Wl_Window *win, int *x, int *y, int *w, int *h);
-EAPI void ecore_wl_window_keyboard_state_set(Ecore_Wl_Window *win, Eina_Bool on);
+EAPI void ecore_wl_window_keyboard_state_set(Ecore_Wl_Window *win, Ecore_Wl_Virtual_Keyboard_State state);
EAPI Ecore_Wl_Virtual_Keyboard_State ecore_wl_window_keyboard_state_get(Ecore_Wl_Window *win);
EAPI void ecore_wl_window_rotation_preferred_rotation_set(Ecore_Wl_Window *win, int rot);
Ecore_Wl_Window *win = NULL;
int org_x, org_y, org_w, org_h;
Eina_Bool changed = EINA_FALSE;
+ Ecore_Wl_Indicator_State ind_state;
Ecore_Wl_Virtual_Keyboard_State kbd_state;
+ Ecore_Wl_Clipboard_State clip_state;
if (!surface) return;
win = ecore_wl_window_surface_find(surface);
ecore_wl_window_indicator_geometry_set(win, x, y, w, h);
changed = EINA_TRUE;
}
- if (state != ecore_wl_window_indicator_state_get(win))
+
+ /* The given state is based on the visibility value of indicator.
+ * Thus we need to add 1 to it before comparing with indicator state.
+ */
+ ind_state = ecore_wl_window_indicator_state_get(win);
+ if ((state + 1) != ind_state)
{
- ecore_wl_window_indicator_state_set(win, state);
+ ecore_wl_window_indicator_state_set(win, state + 1);
changed = EINA_TRUE;
}
}
ecore_wl_window_clipboard_geometry_set(win, x, y, w, h);
changed = EINA_TRUE;
}
- if (state != ecore_wl_window_clipboard_state_get(win))
+
+ /* The given state is based on the visibility value of clipboard window.
+ * Thus we need to add 1 to it before comparing with clipboard state.
+ */
+ clip_state = ecore_wl_window_clipboard_state_get(win);
+ if ((state + 1) != clip_state)
{
- ecore_wl_window_clipboard_state_set(win, state);
+ ecore_wl_window_clipboard_state_set(win, state + 1);
changed = EINA_TRUE;
}
}
}
EAPI void
-ecore_wl_window_clipboard_state_set(Ecore_Wl_Window *win, Eina_Bool on)
+ecore_wl_window_clipboard_state_set(Ecore_Wl_Window *win, Ecore_Wl_Clipboard_State state)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!win) return;
- if (on) win->clipboard.state = ECORE_WL_CLIPBOARD_STATE_ON;
- else if(!on) win->clipboard.state = ECORE_WL_CLIPBOARD_STATE_OFF;
-
+ win->clipboard.state = state;
}
EAPI Ecore_Wl_Clipboard_State
}
EAPI void
-ecore_wl_window_keyboard_state_set(Ecore_Wl_Window *win, Eina_Bool on)
+ecore_wl_window_keyboard_state_set(Ecore_Wl_Window *win, Ecore_Wl_Virtual_Keyboard_State state)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!win) return;
- if (on) win->keyboard.state = ECORE_WL_VIRTUAL_KEYBOARD_STATE_ON;
- else if (!on) win->keyboard.state = ECORE_WL_VIRTUAL_KEYBOARD_STATE_OFF;
+ win->keyboard.state = state;
}
EAPI Ecore_Wl_Virtual_Keyboard_State