diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 97e646b53..122343786 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1027,6 +1027,18 @@ _e_comp_wl_surface_state_buffer_set(E_Comp_Wl_Surface_State *state, E_Comp_Wl_Bu &state->buffer_destroy_listener); } +static void +_e_comp_wl_surface_state_attach(E_Client *ec, E_Comp_Wl_Surface_State *state) +{ + /* set usable early because shell module checks this */ + e_pixmap_usable_set(ec->pixmap, (state->buffer != NULL)); + e_pixmap_resource_set(ec->pixmap, state->buffer); + e_pixmap_dirty(ec->pixmap); + e_pixmap_refresh(ec->pixmap); + + _e_comp_wl_surface_state_size_update(ec, state); +} + static void _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { @@ -1039,7 +1051,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) ignored = ec->ignored; if (state->new_attach) - e_comp_wl_surface_attach(ec, state->buffer); + _e_comp_wl_surface_state_attach(ec, state); _e_comp_wl_surface_state_buffer_set(state, NULL); @@ -2821,18 +2833,6 @@ e_comp_wl_surface_create(struct wl_client *client, int version, uint32_t id) return ret; } -EINTERN void -e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer) -{ - /* set usable early because shell module checks this */ - e_pixmap_usable_set(ec->pixmap, (buffer != NULL)); - e_pixmap_resource_set(ec->pixmap, buffer); - e_pixmap_dirty(ec->pixmap); - e_pixmap_refresh(ec->pixmap); - - _e_comp_wl_surface_state_size_update(ec, &ec->comp_data->pending); -} - EINTERN Eina_Bool e_comp_wl_surface_commit(E_Client *ec) { diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index cc8a33871..893c490c8 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -328,7 +328,6 @@ EINTERN void e_comp_wl_shutdown(void); EINTERN struct wl_resource *e_comp_wl_surface_create(struct wl_client *client, int version, uint32_t id); EINTERN void e_comp_wl_surface_destroy(struct wl_resource *resource); -EINTERN void e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer); EINTERN Eina_Bool e_comp_wl_surface_commit(E_Client *ec); EINTERN Eina_Bool e_comp_wl_subsurface_commit(E_Client *ec); EINTERN void e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buffer *buffer);