summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-12-04 14:41:20 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-12-05 11:59:07 -0500
commit97bc214bab5e05537df92c81d099b1e5f8e085c6 (patch)
tree77d37c17e5807d6bd087ee1f0b00bf049614c96a
parent7077b76bbb3c4d3db3cbf415952592fcb7870ca9 (diff)
poc for shadow togglingdevs/discomfitor/xdg-shedsmanship
-rw-r--r--src/lib/elm_win.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 3fbe2bf6a..42ec111a8 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -116,6 +116,7 @@ struct _Elm_Win_Data
116 { 116 {
117 Ecore_Wl2_Window *win; 117 Ecore_Wl2_Window *win;
118 Eina_Bool opaque_dirty : 1; 118 Eina_Bool opaque_dirty : 1;
119 Eina_Bool no_shadow : 1;
119 } wl; 120 } wl;
120#endif 121#endif
121#ifdef HAVE_ELEMENTARY_COCOA 122#ifdef HAVE_ELEMENTARY_COCOA
@@ -1302,6 +1303,23 @@ _elm_win_frame_obj_update(Elm_Win_Data *sd)
1302} 1303}
1303 1304
1304static void 1305static void
1306_elm_win_frame_shadow_state_update(Elm_Win_Data *sd, Eina_Bool noshadow)
1307{
1308 const char *emission;
1309
1310 if (noshadow)
1311 emission = "elm,state,shadow,off";
1312 else
1313 emission = "elm,state,shadow,on";
1314
1315 edje_object_signal_emit(sd->frame_obj, emission, "elm");
1316 edje_object_message_signal_process(sd->frame_obj);
1317 evas_object_smart_calculate(sd->frame_obj);
1318
1319 _elm_win_frame_obj_update(sd);
1320}
1321
1322static void
1305_elm_win_frame_maximized_state_update(Elm_Win_Data *sd, Eina_Bool maximized) 1323_elm_win_frame_maximized_state_update(Elm_Win_Data *sd, Eina_Bool maximized)
1306{ 1324{
1307 const char *emission; 1325 const char *emission;
@@ -1336,6 +1354,14 @@ _elm_win_state_change(Ecore_Evas *ee)
1336 1354
1337 obj = sd->obj; 1355 obj = sd->obj;
1338 1356
1357#ifdef HAVE_ELEMENTARY_WL2
1358 if (sd->wl.no_shadow == ecore_wl2_window_shadow_get(sd->wl.win))
1359 {
1360 sd->wl.no_shadow = !ecore_wl2_window_shadow_get(sd->wl.win);
1361 _elm_win_frame_shadow_state_update(sd, sd->wl.no_shadow);
1362 }
1363#endif
1364
1339 if (sd->withdrawn != ecore_evas_withdrawn_get(sd->ee)) 1365 if (sd->withdrawn != ecore_evas_withdrawn_get(sd->ee))
1340 { 1366 {
1341 sd->withdrawn = ecore_evas_withdrawn_get(sd->ee); 1367 sd->withdrawn = ecore_evas_withdrawn_get(sd->ee);
@@ -3080,6 +3106,11 @@ _elm_win_frame_add(Elm_Win_Data *sd,
3080 edje_object_signal_callback_add 3106 edje_object_signal_callback_add
3081 (sd->frame_obj, "elm,action,close", "elm", _elm_win_frame_cb_close, obj); 3107 (sd->frame_obj, "elm,action,close", "elm", _elm_win_frame_cb_close, obj);
3082 3108
3109 if (sd->wl.no_shadow)
3110 edje_object_signal_emit(sd->frame_obj, "elm,state,shadow,off", "elm");
3111 else
3112 edje_object_signal_emit(sd->frame_obj, "elm,state,shadow,on", "elm");
3113
3083 if (sd->title) 3114 if (sd->title)
3084 { 3115 {
3085 edje_object_part_text_escaped_set 3116 edje_object_part_text_escaped_set