{
#ifdef HAVE_ELEMENTARY_X
Ecore_X_Window zone = 0;
- Evas_Object *top;
Ecore_X_Window xwin;
#endif
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ Ecore_Wl_Window *wlwin;
+#endif
+ Evas_Object *top;
int sx = -1, sy = -1, sw = -1, sh = -1;
ELM_CONFORMANT_DATA_GET(obj, sd);
+ top = elm_widget_top_get(obj);
#ifdef HAVE_ELEMENTARY_X
- top = elm_widget_top_get(obj);
xwin = elm_win_xwindow_get(top);
if (xwin)
(zone, &sx, &sy, &sw, &sh)))
sx = sy = sw = sh = 0;
}
+#endif
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ wlwin = elm_win_wl_window_get(top);
+ if (wlwin)
+ ecore_wl_window_indicator_geometry_get(wlwin, &sx, &sy, &sw, &sh);
#endif
if (((sd->rot == 90) || (sd->rot == 270)) && sd->landscape_indicator)
_conformant_part_size_hints_set(obj, sd->landscape_indicator, sx, sy, sw, sh);
}
}
}
+#endif
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ wlwin = elm_win_wl_window_get(top);
+ if (wlwin)
+ ecore_wl_window_keyboard_geometry_get(wlwin, &sx, &sy, &sw, &sh);
#endif
DBG("[KEYPAD]: size(%d,%d, %dx%d).", sx, sy, sw, sh);
_conformant_part_size_hints_set
#endif
+static void
+_on_conformant_changed(void *data,
+ Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ Conformant_Part_Type part_type;
+
+ part_type = (ELM_CONFORMANT_INDICATOR_PART |
+ ELM_CONFORMANT_VIRTUAL_KEYPAD_PART);
+
+ _conformant_part_sizing_eval(data, part_type);
+}
+
EOLIAN static void
_elm_conformant_evas_object_smart_add(Eo *obj, Elm_Conformant_Data *_pd EINA_UNUSED)
{
(top, "indicator,prop,changed", _on_indicator_mode_changed, obj);
evas_object_smart_callback_add
(top, "rotation,changed", _on_rotation_changed, obj);
+ evas_object_smart_callback_add
+ (top, "conformant,changed", _on_conformant_changed, obj);
}
static void
Elm_Win_Keyboard_Mode kbdmode;
Elm_Win_Indicator_Mode indmode;
Elm_Win_Indicator_Opacity_Mode ind_o_mode;
+ Eina_Rectangle kbd;
+ Eina_Rectangle ind;
struct
{
const char *info;
static const char SIG_PROFILE_CHANGED[] = "profile,changed";
static const char SIG_WM_ROTATION_CHANGED[] = "wm,rotation,changed";
static const char SIG_THEME_CHANGED[] = "theme,changed";
+static const char SIG_CONFORMANT_CHANGED[] = "conformant,changed";
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_DELETE_REQUEST, ""},
{SIG_WM_ROTATION_CHANGED, ""},
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
+ {SIG_CONFORMANT_CHANGED, ""},
{NULL, NULL}
};
Eina_Bool ch_maximized = EINA_FALSE;
Eina_Bool ch_profile = EINA_FALSE;
Eina_Bool ch_wm_rotation = EINA_FALSE;
+ Eina_Bool ch_conformant = EINA_FALSE;
const char *profile;
if (!sd) return;
ch_wm_rotation = EINA_TRUE;
}
}
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ int x = 0, y = 0, w = 0, h = 0;
+ if (sd->indmode != (Elm_Win_Indicator_Mode)ecore_wl_window_indicator_state_get(sd->wl.win))
+ {
+ sd->indmode = ecore_wl_window_indicator_state_get(sd->wl.win);
+ ch_conformant = EINA_TRUE;
+ }
+ if (sd->kbdmode != (Elm_Win_Keyboard_Mode)ecore_wl_window_keyboard_state_get(sd->wl.win))
+ {
+ sd->kbdmode = ecore_wl_window_keyboard_state_get(sd->wl.win);
+ ch_conformant = EINA_TRUE;
+ }
+ if (ecore_wl_window_indicator_geometry_get(sd->wl.win, &x, &y, &w, &h))
+ {
+ if ((sd->ind.x != x) || (sd->ind.y != y) || (sd->ind.w != w) || (sd->ind.h != h))
+ {
+ sd->ind.x = x;
+ sd->ind.y = y;
+ sd->ind.w = w;
+ sd->ind.h = h;
+ ch_conformant = EINA_TRUE;
+ }
+ }
+ if (ecore_wl_window_keyboard_geometry_get(sd->wl.win, &x, &y, &w, &h))
+ {
+ if ((sd->ind.x != x) || (sd->ind.y != y) || (sd->ind.w != w) || (sd->ind.h != h))
+ {
+ sd->kbd.x = x;
+ sd->kbd.y = y;
+ sd->kbd.w = w;
+ sd->kbd.h = h;
+ ch_conformant = EINA_TRUE;
+ }
+ }
+#endif
_elm_win_state_eval_queue();
evas_object_smart_callback_call(obj, SIG_ROTATION_CHANGED, NULL);
evas_object_smart_callback_call(obj, SIG_WM_ROTATION_CHANGED, NULL);
}
+ if (ch_conformant)
+ {
+ evas_object_smart_callback_call(obj, SIG_CONFORMANT_CHANGED, NULL);
+ }
}
EOLIAN static Eina_Bool
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_conformant_set(sd->x.xwin, conformant);
+#elif HAVE_ELEMENTARY_WAYLAND
+ _elm_win_wlwindow_get(sd);
+ if (sd->wl.win)
+ ecore_wl_window_conformant_set(sd->wl.win, conformant);
#else
(void)conformant;
+
#endif
}
if (sd->x.xwin)
return ecore_x_e_illume_conformant_get(sd->x.xwin);
#endif
+#if HAVE_ELEMENTARY_WAYLAND
+ _elm_win_wlwindow_get(sd);
+ if (sd->wl.win)
+ return ecore_wl_window_conformant_get(sd->wl.win);
+#endif
return EINA_FALSE;
}