summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-11-07 13:10:02 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-11-07 13:10:02 -0500
commitbf2e36236c66a26842bf7a9a94a4f07008b9c3a0 (patch)
tree395cf4116ef71b3ff4ffa644824393aec458732b
parent18fba8e5d782374a0e4222b229e129cd9ab42ee6 (diff)
toggle x11 client iconic/mapped state based on mirror visibility
in order to continue rendering an iconic client without breaking icccm, it's necessary to map the client's window again and unset iconic state whenever rendering is needed, then re-set states when rendering stops ref T2788
-rw-r--r--src/bin/e_comp_x.c30
-rw-r--r--src/bin/e_comp_x.h1
2 files changed, 28 insertions, 3 deletions
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 63074c3ec..e5a098967 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -969,9 +969,10 @@ _e_comp_x_client_hide(E_Client *ec)
969 if ((!ec->iconic) && (!ec->override)) 969 if ((!ec->iconic) && (!ec->override))
970 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);
971 971
972 if (ec->unredirected_single || ec->iconic) 972 ec->comp_data->iconic = ec->iconic && (!e_comp_object_mirror_visibility_check(ec->frame));
973 if (ec->unredirected_single || ec->comp_data->iconic)
973 ecore_x_window_hide(_e_comp_x_client_window_get(ec)); 974 ecore_x_window_hide(_e_comp_x_client_window_get(ec));
974 if (ec->iconic) 975 if (ec->comp_data->iconic)
975 e_hints_window_iconic_set(ec); 976 e_hints_window_iconic_set(ec);
976} 977}
977 978
@@ -1003,10 +1004,11 @@ _e_comp_x_client_show(E_Client *ec)
1003 ecore_x_window_shadow_tree_flush(); 1004 ecore_x_window_shadow_tree_flush();
1004 if (!_e_comp_x_client_data_get(ec)->need_reparent) 1005 if (!_e_comp_x_client_data_get(ec)->need_reparent)
1005 ecore_x_window_show(win); 1006 ecore_x_window_show(win);
1006 if (ec->unredirected_single || ec->iconic) 1007 if (ec->unredirected_single || ec->comp_data->iconic)
1007 { 1008 {
1008 e_pixmap_clear(ec->pixmap); 1009 e_pixmap_clear(ec->pixmap);
1009 ecore_x_window_show(_e_comp_x_client_window_get(ec)); 1010 ecore_x_window_show(_e_comp_x_client_window_get(ec));
1011 ec->comp_data->iconic = 0;
1010 } 1012 }
1011 if (!ec->override) 1013 if (!ec->override)
1012 e_hints_window_visible_set(ec); 1014 e_hints_window_visible_set(ec);
@@ -1170,6 +1172,26 @@ _e_comp_x_resize_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_E
1170} 1172}
1171 1173
1172static void 1174static void
1175_e_comp_x_evas_mirror_hidden(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
1176{
1177 E_Client *ec = data;
1178
1179 if ((!ec->iconic) || (!ec->comp_data->iconic)) return;
1180 if (_e_comp_x_client_data_get(ec))
1181 _e_comp_x_client_hide(ec);
1182}
1183
1184static void
1185_e_comp_x_evas_mirror_visible(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
1186{
1187 E_Client *ec = data;
1188
1189 if ((!ec->iconic) || ec->comp_data->iconic) return;
1190 if (_e_comp_x_client_data_get(ec))
1191 _e_comp_x_client_show(ec);
1192}
1193
1194static void
1173_e_comp_x_client_evas_init(E_Client *ec) 1195_e_comp_x_client_evas_init(E_Client *ec)
1174{ 1196{
1175 if (_e_comp_x_client_data_get(ec)->evas_init) return; 1197 if (_e_comp_x_client_data_get(ec)->evas_init) return;
@@ -1191,6 +1213,8 @@ _e_comp_x_client_evas_init(E_Client *ec)
1191 evas_object_smart_callback_add(ec->frame, "color_set", _e_comp_x_evas_color_set_cb, ec); 1213 evas_object_smart_callback_add(ec->frame, "color_set", _e_comp_x_evas_color_set_cb, ec);
1192 evas_object_smart_callback_add(ec->frame, "fullscreen_zoom", _e_comp_x_evas_fullscreen_zoom_cb, ec); 1214 evas_object_smart_callback_add(ec->frame, "fullscreen_zoom", _e_comp_x_evas_fullscreen_zoom_cb, ec);
1193 evas_object_smart_callback_add(ec->frame, "unfullscreen_zoom", _e_comp_x_evas_unfullscreen_zoom_cb, ec); 1215 evas_object_smart_callback_add(ec->frame, "unfullscreen_zoom", _e_comp_x_evas_unfullscreen_zoom_cb, ec);
1216 evas_object_smart_callback_add(ec->frame, "visibility_force", _e_comp_x_evas_mirror_visible, ec);
1217 evas_object_smart_callback_add(ec->frame, "visibility_normal", _e_comp_x_evas_mirror_hidden, ec);
1194 /* force apply this since we haven't set up our smart cb previously */ 1218 /* force apply this since we haven't set up our smart cb previously */
1195 _e_comp_x_evas_comp_hidden_cb(ec, NULL, NULL); 1219 _e_comp_x_evas_comp_hidden_cb(ec, NULL, NULL);
1196} 1220}
diff --git a/src/bin/e_comp_x.h b/src/bin/e_comp_x.h
index 28da7b5a8..30f8981f3 100644
--- a/src/bin/e_comp_x.h
+++ b/src/bin/e_comp_x.h
@@ -106,6 +106,7 @@ struct _E_Comp_X_Client_Data
106 Eina_Bool evas_init : 1; 106 Eina_Bool evas_init : 1;
107 Eina_Bool unredirected_single : 1; 107 Eina_Bool unredirected_single : 1;
108 Eina_Bool fetch_gtk_frame_extents : 1; 108 Eina_Bool fetch_gtk_frame_extents : 1;
109 Eina_Bool iconic : 1;
109}; 110};
110 111
111E_API Eina_Bool e_comp_x_init(void); 112E_API Eina_Bool e_comp_x_init(void);