derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f0f02d33864a8d4110cf9b2c7002f7e222312ca6

commit f0f02d33864a8d4110cf9b2c7002f7e222312ca6
Author: Derek Foreman <[email protected]>
Date:   Mon Nov 20 12:51:35 2017 -0600

    win: make _elm_win_opaque_update check that it has a wayland window
    
    This function will destroy non-wayland engine data, so it should
    make sure it's actually operating on a wayland window.
    
    Originally the sd->wl.win test was sufficient, but now wl.win is
    present on non-wl windows to facilitate cut and paste, so we need
    to check more thoroughly.
---
 src/lib/elementary/efl_ui_win.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index d80a20148d..7ad4eae842 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1401,10 +1401,17 @@ _elm_win_opaque_update(Efl_Ui_Win_Data *sd, Eina_Bool 
force_alpha)
    int ox, oy, ow, oh;
    Eina_Bool alpha;
    Ecore_Evas_Engine_Wl_Data *wdata;
+   const char *engine_name;
 
    if (!sd->wl.win) return;
    if (!sd->shown) return;
 
+   /* If this isn't a wayland window, BAIL now to avoid destroying
+    * non-wayland engine data structures...
+    */
+   engine_name = ecore_evas_engine_name_get(sd->ee);
+   if (strncmp(engine_name, "wayland", sizeof("wayland") - 1)) return;
+
    wdata = sd->ee->engine.data;
    alpha = ecore_evas_alpha_get(sd->ee) || force_alpha;
    if (sd->fullscreen || !sd->frame_obj)

-- 


Reply via email to