ecore_wl2: Add API to disable session recovery

Enlightenment needs a way to avoid using session recovery functionality
when connecting to itself for internal windows.
This commit is contained in:
Derek Foreman 2016-10-25 14:07:09 -05:00
parent c173be4db7
commit 09378052e7
2 changed files with 17 additions and 1 deletions

View File

@ -1243,6 +1243,15 @@ EAPI void ecore_wl2_offer_finish(Ecore_Wl2_Offer *offer);
*/
EAPI Eina_Bool ecore_wl2_window_has_shell_surface(Ecore_Wl2_Window *win);
/**
* Disable session recovery for any further connections. Must be called
* before connecting. This is irreversible and not intended for general
* use.
*
* @since 1.19
*/
EAPI void ecore_wl2_session_recovery_disable(void);
# endif
# undef EAPI

View File

@ -92,7 +92,8 @@ ecore_wl2_init(void)
_ecore_wl2_event_window_www = ecore_event_type_new();
_ecore_wl2_event_window_www_drag = ecore_event_type_new();
}
no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
if (!no_session_recovery)
no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
return _ecore_wl2_init_count;
@ -155,3 +156,9 @@ ecore_wl2_shutdown(void)
return _ecore_wl2_init_count;
}
EAPI void
ecore_wl2_session_recovery_disable(void)
{
no_session_recovery = EINA_TRUE;
}