diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2018-02-22 13:20:25 -0500 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2018-02-22 13:20:25 -0500 |
commit | e1832b463e72e8e041a64f33eaf5d38a599dcaab (patch) | |
tree | 782bae4ff3f769b1bea7f6910c8b6c312cdb3a20 | |
parent | 5de469a690d6f69bc9a9d83dab03891d8ca6b910 (diff) | |
download | enlightenment-devs/discomfitor/output_states.tar.gz |
send wl surface enter/leave based on iconic state where appropriatedevs/discomfitor/output_states
-rw-r--r-- | src/bin/e_comp_wl.c | 28 | ||||
-rw-r--r-- | src/bin/e_comp_wl.h | 1 |
2 files changed, 28 insertions, 1 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 1c0bdccd59..81e9c804a4 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; @@ -1015,6 +1015,28 @@ _e_comp_wl_buffer_cb_destroy(struct wl_listener *listener, void *data EINA_UNUSE } 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) { if (ec->comp_data->evas_init) return; @@ -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 11bc1ff889..257c51ec78 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 |