{
E_Client *ec = surface->ec;
- if (!surface->base.first_commit)
- surface->base.first_commit = EINA_TRUE;
-
if (!surface->base.mapped)
{
if (surface->base.shell.surface && surface->base.pending.new_attach &&
Eina_List *hints;
bool changed;
bool use_msg;
+ bool committed;
struct wl_listener ec_destroy;
struct wl_listener surface_destroy;
+ struct wl_listener commit;
};
static Eina_List *aux_hints_supported = NULL;
E_FREE(hint);
}
+ if (!surface->committed)
+ wl_list_remove(&surface->commit.link);
+
if (surface->ec)
wl_list_remove(&surface->ec_destroy.link);
_surface_destroy(surface);
}
+static void
+_surface_cb_commit(struct wl_listener *listener, void *data)
+{
+ E_Aux_Hint_Surface *surface = wl_container_of(listener, surface, commit);
+
+ surface->committed = true;
+ wl_list_remove(&surface->commit.link);
+}
+
static E_Aux_Hint_Surface *
_surface_create(E_Surface *e_surface)
{
surface->surface_destroy.notify = _surface_cb_surface_destroy;
e_surface_destroy_listener_add(e_surface, &surface->surface_destroy);
+ surface->commit.notify = _surface_cb_commit;
+ e_surface_commit_listener_add(e_surface, &surface->commit);
+
ELOGF("HINTS", "Create E_Aux_Hint_Surface(%p)", surface->ec, surface);
return surface;
{
return surface->use_msg;
}
+
+EINTERN bool
+e_aux_hint_surface_is_committed(E_Aux_Hint_Surface *surface)
+{
+ return surface->committed;
+}
*/
Eina_List *e_aux_hint_surface_hints_get(E_Aux_Hint_Surface *surface);
+/**
+ * Check if the associated surface has been committed
+ */
+bool e_aux_hint_surface_is_committed(E_Aux_Hint_Surface *surface);
+
/**
* Set use_msg to given value
*/
#include "e_policy_wl_intern.h"
#include "e_policy_container_intern.h"
#include "e_view_rect.h"
+#include "e_hints_intern.h"
#define ZONE_EC_DATA_KEY "E_Zone_Client"
// ignored client but needing eval (aux hint) such as remote surfaces
if (ec->changed)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- if (cdata && cdata->first_commit)
- e_client_aux_hint_eval(ec);
+ E_Aux_Hint_Surface *hsurface = e_aux_hint_surface_try_from_ec(ec);
+ if (hsurface && e_aux_hint_surface_is_committed(hsurface))
+ e_client_aux_hint_eval(ec);
}
continue;
}
E_DEPRECATED Eina_Bool video_client : 1;
Eina_Bool has_video_client : 1;
E_DEPRECATED Eina_Bool never_hwc : 1; // force window not to do hwc
- Eina_Bool first_commit : 1; // TRUE : once client committed
+ E_DEPRECATED Eina_Bool first_commit : 1; // TRUE : once client committed
E_DEPRECATED unsigned char accepts_focus : 1;
E_DEPRECATED unsigned char conformant : 1;
E_DEPRECATED E_Window_Type win_type;