typedef struct _Ecore_Wl_Event_Interfaces_Bound Ecore_Wl_Event_Interfaces_Bound;
typedef struct _Ecore_Wl_Event_Conformant_Change Ecore_Wl_Event_Conformant_Change;
typedef struct _Ecore_Wl_Event_Aux_Hint_Allowed Ecore_Wl_Event_Aux_Hint_Allowed;
+typedef struct _Ecore_Wl_Event_Window_Iconify_State_Change Ecore_Wl_Event_Window_Iconify_State_Change;
enum _Ecore_Wl_Window_Type
{
int id;
};
+struct _Ecore_Wl_Event_Window_Iconify_State_Change
+{
+ unsigned int win;
+ int iconified;
+ int force;
+};
+
/**
* @file
* @brief Ecore functions for dealing with the Wayland window system
EAPI extern int ECORE_WL_EVENT_INTERFACES_BOUND;
EAPI extern int ECORE_WL_EVENT_CONFORMANT_CHANGE;
EAPI extern int ECORE_WL_EVENT_AUX_HINT_ALLOWED;
+EAPI extern int ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE;
/**
* @defgroup Ecore_Wl_Init_Group Wayland Library Init and Shutdown Functions
static void _ecore_wl_cb_notification_done(void *data, struct tizen_policy *tizen_policy, struct wl_surface *surface, int32_t level, uint32_t state);
static void _ecore_wl_cb_transient_for_done(void *data, struct tizen_policy *tizen_policy, uint32_t child_id);
static void _ecore_wl_cb_scr_mode_done(void *data, struct tizen_policy *tizen_policy, struct wl_surface *surface, uint32_t mode, uint32_t state);
+static void _ecore_wl_cb_iconify_state_changed(void *data EINA_UNUSED, struct tizen_policy *tizen_policy EINA_UNUSED, struct wl_surface *surface_resource, uint32_t iconified, uint32_t force);
static void _ecore_wl_cb_supported_aux_hints(void *data EINA_UNUSED, struct tizen_policy *tizen_policy EINA_UNUSED, struct wl_surface *surface_resource, struct wl_array *hints, uint32_t num_hints);
static void _ecore_wl_cb_allowed_aux_hint(void *data EINA_UNUSED, struct tizen_policy *tizen_policy EINA_UNUSED, struct wl_surface *surface_resource, int id);
static void _ecore_wl_window_conformant_area_send(Ecore_Wl_Window *win, uint32_t conformant_part, uint32_t state);
_ecore_wl_cb_notification_done,
_ecore_wl_cb_transient_for_done,
_ecore_wl_cb_scr_mode_done,
+ _ecore_wl_cb_iconify_state_changed,
_ecore_wl_cb_supported_aux_hints,
_ecore_wl_cb_allowed_aux_hint,
};
EAPI int ECORE_WL_EVENT_INTERFACES_BOUND = 0;
EAPI int ECORE_WL_EVENT_CONFORMANT_CHANGE = 0;
EAPI int ECORE_WL_EVENT_AUX_HINT_ALLOWED = 0;
+EAPI int ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE = 0;
static void
_ecore_wl_init_callback(void *data, struct wl_callback *callback, uint32_t serial EINA_UNUSED)
ECORE_WL_EVENT_INTERFACES_BOUND = ecore_event_type_new();
ECORE_WL_EVENT_CONFORMANT_CHANGE = ecore_event_type_new();
ECORE_WL_EVENT_AUX_HINT_ALLOWED = ecore_event_type_new();
+ ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE = ecore_event_type_new();
}
if (!(_ecore_wl_disp = calloc(1, sizeof(Ecore_Wl_Display))))
}
static void
+_ecore_wl_cb_iconify_state_changed(void *data EINA_UNUSED, struct tizen_policy *tizen_policy EINA_UNUSED, struct wl_surface *surface_resource, uint32_t iconified, uint32_t force)
+{
+ struct wl_surface *surface = surface_resource;
+ Ecore_Wl_Window *win = NULL;
+ Ecore_Wl_Event_Window_Iconify_State_Change *ev;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+ if (!surface) return;
+ win = ecore_wl_window_surface_find(surface);
+ if (!win) return;
+
+ if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Window_Iconify_State_Change)))) return;
+ ev->win = win->id;
+ ev->iconified = iconified;
+ ev->force = force;
+
+ ecore_event_add(ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE, ev, NULL, NULL);
+}
+
+static void
_ecore_wl_cb_supported_aux_hints(void *data EINA_UNUSED, struct tizen_policy *tizen_policy EINA_UNUSED, struct wl_surface *surface_resource, struct wl_array *hints, uint32_t num_hints)
{
struct wl_surface *surface = surface_resource;
/* local variables */
static int _ecore_evas_wl_init_count = 0;
-static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[8];
+static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[9];
static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
}
static Eina_Bool
+_ecore_evas_wl_common_cb_window_iconify_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+ Ecore_Evas *ee;
+ Ecore_Wl_Event_Window_Iconify_State_Change *ev;
+
+ ev = event;
+ ee = ecore_event_window_match(ev->win);
+
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
+ if (!ev->force) return ECORE_CALLBACK_PASS_ON;
+ if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+
+ if (ee->prop.iconified == ev->iconified)
+ return ECORE_CALLBACK_PASS_ON;
+
+ ee->prop.iconified = ev->iconified;
+ _ecore_evas_wl_common_state_update(ee);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
_ecore_evas_wl_common_cb_window_rotate(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Evas *ee;
_ecore_evas_wl_event_hdls[7] =
ecore_event_handler_add(ECORE_WL_EVENT_AUX_HINT_ALLOWED,
_ecore_evas_wl_common_cb_aux_hint_allowed, NULL);
+ _ecore_evas_wl_event_hdls[8] =
+ ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE,
+ _ecore_evas_wl_common_cb_window_iconify_change, NULL);
ecore_event_evas_init();