summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-11-07 13:05:18 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-11-07 13:05:18 -0500
commitf0cc657e4c7fcea5ff1ccdde7602516c65e24ea1 (patch)
treeec02ca92046fa970046d9686c3ceb197f55a0323
parent4250a148614d495bf5b3bdfccf3eef5a5c8835c7 (diff)
break out x11 client visibility setting into util functions
-rw-r--r--src/bin/e_comp_x.c36
1 files changed, 25 insertions, 11 deletions
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 5b17abe16..3a504dcbf 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -961,22 +961,29 @@ _e_comp_x_evas_resize_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_i
961} 961}
962 962
963static void 963static void
964_e_comp_x_evas_hide_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 964_e_comp_x_client_hide(E_Client *ec)
965{ 965{
966 E_Client *ec = data, *tmp;
967 unsigned int visible = 0; 966 unsigned int visible = 0;
968 Eina_List *l;
969 967
970 if (!_e_comp_x_client_data_get(ec)) return; // already deleted, happens with internal wins
971 ecore_x_window_shadow_tree_flush(); 968 ecore_x_window_shadow_tree_flush();
972 if ((!ec->iconic) && (!ec->override)) 969 if ((!ec->iconic) && (!ec->override))
973 ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_MAPPED, &visible, 1); 970 ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_MAPPED, &visible, 1);
974 971
975 EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
976 evas_object_hide(tmp->frame);
977
978 if (ec->unredirected_single || ec->iconic) 972 if (ec->unredirected_single || ec->iconic)
979 ecore_x_window_hide(_e_comp_x_client_window_get(ec)); 973 ecore_x_window_hide(_e_comp_x_client_window_get(ec));
974}
975
976static void
977_e_comp_x_evas_hide_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
978{
979 E_Client *ec = data, *tmp;
980 Eina_List *l;
981
982 if (!_e_comp_x_client_data_get(ec)) return; // already deleted, happens with internal wins
983 _e_comp_x_client_hide(ec);
984
985 EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
986 evas_object_hide(tmp->frame);
980 987
981 if (e_comp_config_get()->send_flush) 988 if (e_comp_config_get()->send_flush)
982 ecore_x_e_comp_flush_send(e_client_util_win_get(ec)); 989 ecore_x_e_comp_flush_send(e_client_util_win_get(ec));
@@ -985,14 +992,11 @@ _e_comp_x_evas_hide_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
985} 992}
986 993
987static void 994static void
988_e_comp_x_evas_show_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 995_e_comp_x_client_show(E_Client *ec)
989{ 996{
990 E_Client *ec = data, *tmp;
991 unsigned int visible = 1; 997 unsigned int visible = 1;
992 Ecore_X_Window win; 998 Ecore_X_Window win;
993 Eina_List *l;
994 999
995 if (!_e_comp_x_client_data_get(ec)) return;
996 win = e_client_util_win_get(ec); 1000 win = e_client_util_win_get(ec);
997 ecore_x_window_shadow_tree_flush(); 1001 ecore_x_window_shadow_tree_flush();
998 if (!_e_comp_x_client_data_get(ec)->need_reparent) 1002 if (!_e_comp_x_client_data_get(ec)->need_reparent)
@@ -1007,6 +1011,16 @@ _e_comp_x_evas_show_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
1007 1011
1008 ecore_x_window_prop_card32_set(win, E_ATOM_MAPPED, &visible, 1); 1012 ecore_x_window_prop_card32_set(win, E_ATOM_MAPPED, &visible, 1);
1009 ecore_x_window_prop_card32_set(win, E_ATOM_MANAGED, &visible, 1); 1013 ecore_x_window_prop_card32_set(win, E_ATOM_MANAGED, &visible, 1);
1014}
1015
1016static void
1017_e_comp_x_evas_show_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
1018{
1019 E_Client *ec = data, *tmp;
1020 Eina_List *l;
1021
1022 if (!_e_comp_x_client_data_get(ec)) return;
1023 _e_comp_x_client_show(ec);
1010 1024
1011 if (_e_comp_x_client_data_get(ec)->frame_update) 1025 if (_e_comp_x_client_data_get(ec)->frame_update)
1012 { 1026 {