summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2014-08-19 17:46:17 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2014-08-19 17:47:34 -0400
commit81101718581e44327a4a47c63ba18749ff3c2792 (patch)
treea9e1dcfb8b27740a13c43f62104c045cb72b0b2c
parent891de2e299808e77c04bd009a7d3f7b1b3ba1096 (diff)
fix maximize of fullscreen clients
-rw-r--r--src/maximize.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/maximize.c b/src/maximize.c
index 77b40e2..7b0314f 100644
--- a/src/maximize.c
+++ b/src/maximize.c
@@ -17,6 +17,7 @@ _ds_unmaximize_post(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
17 evas_object_geometry_get(ec->frame, &x, &y, NULL, NULL); 17 evas_object_geometry_get(ec->frame, &x, &y, NULL, NULL);
18 18
19 rect = evas_object_data_del(obj, "__DSUMAX"); 19 rect = evas_object_data_del(obj, "__DSUMAX");
20 if (!rect) return;
20 evas_object_geometry_set(obj, rect->x, rect->y, rect->w, rect->h); 21 evas_object_geometry_set(obj, rect->x, rect->y, rect->w, rect->h);
21 free(rect); 22 free(rect);
22 efx_resize(ec->frame, EFX_EFFECT_SPEED_SINUSOIDAL, EFX_POINT(x, y), w, h, time, NULL, NULL); 23 efx_resize(ec->frame, EFX_EFFECT_SPEED_SINUSOIDAL, EFX_POINT(x, y), w, h, time, NULL, NULL);
@@ -79,6 +80,17 @@ _ds_maximize(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNU
79} 80}
80 81
81static void 82static void
83_ds_fullscreen(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
84{
85 E_Client *ec = data;
86
87 evas_object_data_del(ec->frame, "__DSMAX");
88 free(evas_object_data_del(ec->frame, "__DSUMAX"));
89 ec->maximize_override = 0;
90 efx_resize_stop(ec->frame);
91}
92
93static void
82_ds_maximize_check(E_Client *ec) 94_ds_maximize_check(E_Client *ec)
83{ 95{
84 if (e_client_util_ignored_get(ec)) return; 96 if (e_client_util_ignored_get(ec)) return;
@@ -86,6 +98,7 @@ _ds_maximize_check(E_Client *ec)
86 evas_object_smart_callback_add(ec->frame, "unmaximize_pre", _ds_unmaximize_pre, ec); 98 evas_object_smart_callback_add(ec->frame, "unmaximize_pre", _ds_unmaximize_pre, ec);
87 evas_object_smart_callback_add(ec->frame, "unmaximize", _ds_unmaximize, ec); 99 evas_object_smart_callback_add(ec->frame, "unmaximize", _ds_unmaximize, ec);
88 evas_object_smart_callback_add(ec->frame, "unmaximize_done", _ds_unmaximize_post, ec); 100 evas_object_smart_callback_add(ec->frame, "unmaximize_done", _ds_unmaximize_post, ec);
101 evas_object_smart_callback_add(ec->frame, "fullscreen", _ds_fullscreen, ec);
89} 102}
90 103
91static Eina_Bool 104static Eina_Bool
@@ -117,6 +130,7 @@ maximize_shutdown(void)
117 evas_object_smart_callback_del(ec->frame, "unmaximize_pre", _ds_unmaximize_pre); 130 evas_object_smart_callback_del(ec->frame, "unmaximize_pre", _ds_unmaximize_pre);
118 evas_object_smart_callback_del(ec->frame, "unmaximize", _ds_unmaximize); 131 evas_object_smart_callback_del(ec->frame, "unmaximize", _ds_unmaximize);
119 evas_object_smart_callback_del(ec->frame, "unmaximize_done", _ds_unmaximize_post); 132 evas_object_smart_callback_del(ec->frame, "unmaximize_done", _ds_unmaximize_post);
133 evas_object_smart_callback_del(ec->frame, "fullscreen", _ds_fullscreen);
120 } 134 }
121 E_FREE_FUNC(eh, ecore_event_handler_del); 135 E_FREE_FUNC(eh, ecore_event_handler_del);
122} 136}