aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-07-15 15:30:48 -0400
committerChris Michael <cp.michael@samsung.com>2016-07-15 15:35:23 -0400
commitfb24955782b9242beb9447ebb6631b2b63921988 (patch)
treed20045325fc625277793c179d6e654d3356bd267 /src/lib/elementary
parentecore_drm2: Allow enabling outputs in drm events (diff)
downloadefl-fb24955782b9242beb9447ebb6631b2b63921988.tar.gz
elementary: Fix issue of toggling border state causing visual jumps
This commit partially fixes a phab ticket where toggling window border state (elm_test -to "Window States") would cause the frame to be destroyed thus making the window contents appear to jump around ref https://phab.enlightenment.org/T4092 NB: I call this a 'partial' fix because while it does fix the issue of efl client apps, there is still some breakage in Enlightenment that needs investigating. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_win.c61
1 files changed, 54 insertions, 7 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 3445069568..d4f0527a69 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -3700,6 +3700,8 @@ _elm_win_frame_del(Efl_Ui_Win_Data *sd)
if (sd->frame_obj)
{
+ edje_object_part_unswallow(sd->frame_obj, sd->edje);
+
evas_object_event_callback_del_full
(sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
evas_object_event_callback_del_full
@@ -3739,6 +3741,56 @@ _elm_win_frame_del(Efl_Ui_Win_Data *sd)
ecore_evas_resize(sd->ee, w, h);
}
+static void
+_elm_win_frame_hide(Efl_Ui_Win_Data *sd)
+{
+ Eina_Bool alpha;
+ Ecore_Evas_Engine_Wl_Data *wdata;
+ int x, y, w, h;
+ int ox, oy, ow, oh;
+
+ if (!sd->frame_obj) return;
+
+ edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.opaque",
+ &ox, &oy, &ow, &oh);
+ edje_object_part_geometry_get(sd->frame_obj, "elm.swallow.client",
+ &x, &y, &w, &h);
+
+ edje_object_part_unswallow(sd->frame_obj, sd->edje);
+ evas_object_hide(sd->frame_obj);
+
+ /* evas_output_framespace_set(sd->evas, 0, 0, 0, 0); */
+
+ wdata = sd->ee->engine.data;
+ wdata->content.x = x;
+ wdata->content.y = y;
+ wdata->content.w = w;
+ wdata->content.h = h;
+
+ alpha = ecore_evas_alpha_get(sd->ee);
+ if (!alpha)
+ ecore_wl2_window_opaque_region_set(sd->wl.win, x, y, w, h);
+ else
+ ecore_wl2_window_opaque_region_set(sd->wl.win, 0, 0, 0, 0);
+
+ ecore_wl2_window_geometry_set(sd->wl.win, x, y, w, h);
+ ecore_wl2_window_input_region_set(sd->wl.win, x, y, w, h);
+}
+
+static void
+_elm_win_frame_show(Efl_Ui_Win_Data *sd)
+{
+ if (!sd->frame_obj) return;
+ edje_object_part_swallow(sd->frame_obj, "elm.swallow.client",
+ sd->edje);
+ evas_object_show(sd->frame_obj);
+
+#ifdef HAVE_ELEMENTARY_WL2
+ _elm_win_opaque_update(sd);
+ _elm_win_frame_obj_update(sd);
+#endif
+}
+
#ifdef ELM_DEBUG
static void
_debug_key_down(void *data EINA_UNUSED,
@@ -4920,16 +4972,11 @@ _efl_ui_win_borderless_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool b
if (borderless)
{
- if (need_frame)
- _elm_win_frame_del(sd);
+ if (need_frame) _elm_win_frame_hide(sd);
}
else
{
- if (need_frame)
- _elm_win_frame_add(sd, "default");
-
- if (sd->frame_obj)
- evas_object_show(sd->frame_obj);
+ if (need_frame) _elm_win_frame_show(sd);
}
TRAP(sd, borderless_set, borderless);