forked from enlightenment/efl
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:
parent
c173be4db7
commit
09378052e7
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue