summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-10-25 14:07:09 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-10-25 14:07:09 -0500
commit09378052e78674a5073785e60c72d0e036176796 (patch)
treee51668b7972308d178b61a93ae227c9e5bac1bd1
parentc173be4db73326a5090d69b7442f5ebfc38f2ce4 (diff)
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.
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h9
-rw-r--r--src/lib/ecore_wl2/ecore_wl2.c9
2 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index d45ed1ac01..30fb5d97b5 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1243,6 +1243,15 @@ EAPI void ecore_wl2_offer_finish(Ecore_Wl2_Offer *offer);
1243 */ 1243 */
1244EAPI Eina_Bool ecore_wl2_window_has_shell_surface(Ecore_Wl2_Window *win); 1244EAPI Eina_Bool ecore_wl2_window_has_shell_surface(Ecore_Wl2_Window *win);
1245 1245
1246/**
1247 * Disable session recovery for any further connections. Must be called
1248 * before connecting. This is irreversible and not intended for general
1249 * use.
1250 *
1251 * @since 1.19
1252 */
1253EAPI void ecore_wl2_session_recovery_disable(void);
1254
1246# endif 1255# endif
1247 1256
1248# undef EAPI 1257# undef EAPI
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index f62dacaa42..397f8e3f16 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -92,7 +92,8 @@ ecore_wl2_init(void)
92 _ecore_wl2_event_window_www = ecore_event_type_new(); 92 _ecore_wl2_event_window_www = ecore_event_type_new();
93 _ecore_wl2_event_window_www_drag = ecore_event_type_new(); 93 _ecore_wl2_event_window_www_drag = ecore_event_type_new();
94 } 94 }
95 no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY"); 95 if (!no_session_recovery)
96 no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
96 97
97 return _ecore_wl2_init_count; 98 return _ecore_wl2_init_count;
98 99
@@ -155,3 +156,9 @@ ecore_wl2_shutdown(void)
155 156
156 return _ecore_wl2_init_count; 157 return _ecore_wl2_init_count;
157} 158}
159
160EAPI void
161ecore_wl2_session_recovery_disable(void)
162{
163 no_session_recovery = EINA_TRUE;
164}