summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-05-05 10:45:59 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-05-05 10:49:31 -0400
commit9d5caf00b624b149b01fc689f3e16c2ff3469335 (patch)
tree8194b3b2e5c53736959be8e53caed0234af41c1a /src/lib/ecore_wl2/ecore_wl2.c
parent0231800b60c7bab5162db8c04b815b884ecd36ab (diff)
wayland: implement session recovery
add support for reconnecting wayland applications if the compositor dies disconnect -> destroy gl ctx + image textures -> block rendering -> reconnect -> create gl ctx -> create image textures -> unblock rendering -> sprinkle special seasoning on top -> just like ma used to make #SamsungFeatures @feature
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index f1fded6193..e9cf9f6131 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -8,9 +8,12 @@
8static int _ecore_wl2_init_count = 0; 8static int _ecore_wl2_init_count = 0;
9 9
10/* external variables */ 10/* external variables */
11Eina_Bool no_session_recovery;
11int _ecore_wl2_log_dom = -1; 12int _ecore_wl2_log_dom = -1;
12 13
13/* public API variables */ 14/* public API variables */
15EAPI int ECORE_WL2_EVENT_CONNECT = 0;
16EAPI int ECORE_WL2_EVENT_DISCONNECT = 0;
14EAPI int ECORE_WL2_EVENT_GLOBAL_ADDED = 0; 17EAPI int ECORE_WL2_EVENT_GLOBAL_ADDED = 0;
15EAPI int ECORE_WL2_EVENT_GLOBAL_REMOVED = 0; 18EAPI int ECORE_WL2_EVENT_GLOBAL_REMOVED = 0;
16EAPI int ECORE_WL2_EVENT_FOCUS_IN = 0; 19EAPI int ECORE_WL2_EVENT_FOCUS_IN = 0;
@@ -67,6 +70,8 @@ ecore_wl2_init(void)
67 /* handle creating new Ecore_Wl2 event types */ 70 /* handle creating new Ecore_Wl2 event types */
68 if (!ECORE_WL2_EVENT_GLOBAL_ADDED) 71 if (!ECORE_WL2_EVENT_GLOBAL_ADDED)
69 { 72 {
73 ECORE_WL2_EVENT_CONNECT = ecore_event_type_new();
74 ECORE_WL2_EVENT_DISCONNECT = ecore_event_type_new();
70 ECORE_WL2_EVENT_GLOBAL_ADDED = ecore_event_type_new(); 75 ECORE_WL2_EVENT_GLOBAL_ADDED = ecore_event_type_new();
71 ECORE_WL2_EVENT_GLOBAL_REMOVED = ecore_event_type_new(); 76 ECORE_WL2_EVENT_GLOBAL_REMOVED = ecore_event_type_new();
72 ECORE_WL2_EVENT_FOCUS_IN = ecore_event_type_new(); 77 ECORE_WL2_EVENT_FOCUS_IN = ecore_event_type_new();
@@ -87,6 +92,7 @@ ecore_wl2_init(void)
87 _ecore_wl2_event_window_www = ecore_event_type_new(); 92 _ecore_wl2_event_window_www = ecore_event_type_new();
88 _ecore_wl2_event_window_www_drag = ecore_event_type_new(); 93 _ecore_wl2_event_window_www_drag = ecore_event_type_new();
89 } 94 }
95 no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
90 96
91 return _ecore_wl2_init_count; 97 return _ecore_wl2_init_count;
92 98
@@ -114,6 +120,8 @@ ecore_wl2_shutdown(void)
114 if (--_ecore_wl2_init_count != 0) return _ecore_wl2_init_count; 120 if (--_ecore_wl2_init_count != 0) return _ecore_wl2_init_count;
115 121
116 /* reset events */ 122 /* reset events */
123 ECORE_WL2_EVENT_CONNECT = 0;
124 ECORE_WL2_EVENT_DISCONNECT = 0;
117 ECORE_WL2_EVENT_GLOBAL_ADDED = 0; 125 ECORE_WL2_EVENT_GLOBAL_ADDED = 0;
118 ECORE_WL2_EVENT_GLOBAL_REMOVED = 0; 126 ECORE_WL2_EVENT_GLOBAL_REMOVED = 0;
119 ECORE_WL2_EVENT_FOCUS_IN = 0; 127 ECORE_WL2_EVENT_FOCUS_IN = 0;