Same as for the global we make sure here we only add the listener if the,
for now, needed env var is set.
ref T2922
EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL);
if (win->surface) return win->surface;
- if (_ecore_wl_disp->wl.session_recovery)
+ if (_ecore_wl_disp->wl.session_recovery && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, &_ecore_session_recovery_listener, win);
win->surface = wl_compositor_create_surface(_ecore_wl_compositor_get());
if (!win->surface) return NULL;