summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-11-17 18:19:15 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-11-17 18:20:49 -0500
commit3982f0fd39d92f2d6bdab7920a96247da1fe4207 (patch)
tree0f9282a41d03b59ad3304d60c5b4ae9d0e84d87d
parentdb3eba449066ce4c1455d2aba0114590b12190e4 (diff)
win: only perform maximize frame state updating during ecore-evas callback
running this during csd button activation leads to state mismatches when maximize is not triggered from the csd button @fix
-rw-r--r--src/lib/elm_win.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index a1d38cc91..01e1f9169 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -1289,6 +1289,23 @@ _elm_win_frame_obj_update(Elm_Win_Data *sd)
1289} 1289}
1290 1290
1291static void 1291static void
1292_elm_win_frame_maximized_state_update(Elm_Win_Data *sd, Eina_Bool maximized)
1293{
1294 const char *emission;
1295
1296 if (maximized)
1297 emission = "elm,state,maximized";
1298 else
1299 emission = "elm,state,unmaximized";
1300
1301 edje_object_signal_emit(sd->frame_obj, emission, "elm");
1302 edje_object_message_signal_process(sd->frame_obj);
1303 evas_object_smart_calculate(sd->frame_obj);
1304
1305 _elm_win_frame_obj_update(sd);
1306}
1307
1308static void
1292_elm_win_state_change(Ecore_Evas *ee) 1309_elm_win_state_change(Ecore_Evas *ee)
1293{ 1310{
1294 Elm_Win_Data *sd = _elm_win_associate_get(ee); 1311 Elm_Win_Data *sd = _elm_win_associate_get(ee);
@@ -1409,6 +1426,7 @@ _elm_win_state_change(Ecore_Evas *ee)
1409 if (_elm_config->atspi_mode) 1426 if (_elm_config->atspi_mode)
1410 elm_interface_atspi_window_restored_signal_emit(obj); 1427 elm_interface_atspi_window_restored_signal_emit(obj);
1411 } 1428 }
1429 _elm_win_frame_maximized_state_update(sd, sd->maximized);
1412 } 1430 }
1413 if (ch_profile) 1431 if (ch_profile)
1414 { 1432 {
@@ -2841,23 +2859,6 @@ _elm_win_frame_cb_minimize(void *data,
2841} 2859}
2842 2860
2843static void 2861static void
2844_elm_win_frame_maximized_state_update(Elm_Win_Data *sd, Eina_Bool maximized)
2845{
2846 const char *emission;
2847
2848 if (maximized)
2849 emission = "elm,state,maximized";
2850 else
2851 emission = "elm,state,unmaximized";
2852
2853 edje_object_signal_emit(sd->frame_obj, emission, "elm");
2854 edje_object_message_signal_process(sd->frame_obj);
2855 evas_object_smart_calculate(sd->frame_obj);
2856
2857 _elm_win_frame_obj_update(sd);
2858}
2859
2860static void
2861_elm_win_frame_cb_maximize(void *data, 2862_elm_win_frame_cb_maximize(void *data,
2862 Evas_Object *obj EINA_UNUSED, 2863 Evas_Object *obj EINA_UNUSED,
2863 const char *sig EINA_UNUSED, 2864 const char *sig EINA_UNUSED,
@@ -2870,8 +2871,6 @@ _elm_win_frame_cb_maximize(void *data,
2870 if (sd->maximized) value = EINA_FALSE; 2871 if (sd->maximized) value = EINA_FALSE;
2871 else value = EINA_TRUE; 2872 else value = EINA_TRUE;
2872 2873
2873 _elm_win_frame_maximized_state_update(sd, value);
2874
2875 TRAP(sd, maximized_set, value); 2874 TRAP(sd, maximized_set, value);
2876} 2875}
2877 2876