diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 1c0bdccd5..81e9c804a 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -84,7 +84,7 @@ _e_comp_wl_surface_outputs_update(E_Client *ec) E_Zone *zone; int32_t obits = 0; - if (ec->visible) + if (ec->visible && (ec->comp_data->force_visible || (!ec->iconic))) EINA_LIST_FOREACH(e_comp->zones, l, zone) if (E_INTERSECTS(zone->x, zone->y, zone->w, zone->h, ec->x, ec->y, ec->w, ec->h)) obits |= 1 << zone->id; @@ -1014,6 +1014,28 @@ _e_comp_wl_buffer_cb_destroy(struct wl_listener *listener, void *data EINA_UNUSE free(buffer); } +static void +_e_comp_wl_evas_mirror_hidden(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + E_Client *ec = data; + + if (e_object_is_del(data)) return; + ec->comp_data->force_visible = 0; + if (!ec->iconic) return; + _e_comp_wl_surface_outputs_update(ec); +} + +static void +_e_comp_wl_evas_mirror_visible(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + E_Client *ec = data; + + if (e_object_is_del(data)) return; + ec->comp_data->force_visible = 1; + if (!ec->iconic) return; + _e_comp_wl_surface_outputs_update(ec); +} + static void _e_comp_wl_client_evas_init(E_Client *ec) { @@ -1081,6 +1103,10 @@ _e_comp_wl_client_evas_init(E_Client *ec) _e_comp_wl_evas_cb_maximize_done, ec); evas_object_smart_callback_add(ec->frame, "fullscreen", _e_comp_wl_evas_cb_state_update, ec); + evas_object_smart_callback_add(ec->frame, "visibility_force", + _e_comp_wl_evas_mirror_visible, ec); + evas_object_smart_callback_add(ec->frame, "visibility_normal", + _e_comp_wl_evas_mirror_hidden, ec); } evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOVE, EVAS_CALLBACK_PRIORITY_AFTER, diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 11bc1ff88..257c51ec7 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -379,6 +379,7 @@ struct _E_Comp_Wl_Client_Data Eina_Bool maximize_anims_disabled E_BITFIELD; Eina_Bool ssd_mouse_in E_BITFIELD; Eina_Bool need_center E_BITFIELD; + Eina_Bool force_visible E_BITFIELD; }; struct _E_Comp_Wl_Output