summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-12-05 13:09:03 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-02 13:32:31 -0500
commitdfa9b45044aa6384ba6ab8db29841f745bb8414d (patch)
treefa349ea875c5f2030817a4414c77afd195f333c1
parente67f238c067cd274c04c5fa701fed3f4d6f1e326 (diff)
create wl client connection during compositor init, use in shot module
fixes shot module ref T2919
-rw-r--r--src/bin/e_comp_wl.c1
-rw-r--r--src/bin/e_comp_wl.h1
-rw-r--r--src/modules/shot/e_mod_main.c6
3 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 1f5ff90a6..b9012e7c4 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2658,6 +2658,7 @@ _e_comp_wl_compositor_create(void)
2658 e_comp_wl_input_keymap_set(rules, model, layout); 2658 e_comp_wl_input_keymap_set(rules, model, layout);
2659 } 2659 }
2660#endif 2660#endif
2661 e_comp_wl->wl.client_disp = ecore_wl2_display_connect(NULL);
2661 2662
2662 /* setup module idler to load shell mmodule */ 2663 /* setup module idler to load shell mmodule */
2663 ecore_idler_add(_e_comp_wl_cb_module_idle, cdata); 2664 ecore_idler_add(_e_comp_wl_cb_module_idle, cdata);
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index 41dcdae4f..893c490c8 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -104,6 +104,7 @@ struct _E_Comp_Wl_Data
104 struct 104 struct
105 { 105 {
106 struct wl_display *disp; 106 struct wl_display *disp;
107 Ecore_Wl2_Display *client_disp;
107 struct wl_registry *registry; // only used for nested wl compositors 108 struct wl_registry *registry; // only used for nested wl compositors
108 /* struct wl_event_loop *loop; */ 109 /* struct wl_event_loop *loop; */
109 Eina_Inlist *globals; // only used for nested wl compositors 110 Eina_Inlist *globals; // only used for nested wl compositors
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index 85d61f791..0174bbb6b 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -953,7 +953,7 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params)
953 sh = E_CLAMP(sh, 1, ec->zone->y + ec->zone->h - y); 953 sh = E_CLAMP(sh, 1, ec->zone->y + ec->zone->h - y);
954 } 954 }
955 955
956 shm = e_comp_wl->wl.shm ?: ecore_wl2_display_shm_get(ewd); 956 shm = e_comp_wl->wl.shm ?: ecore_wl2_display_shm_get(e_comp_wl->wl.client_disp);
957 957
958 EINA_LIST_FOREACH(_outputs, l, output) 958 EINA_LIST_FOREACH(_outputs, l, output)
959 { 959 {
@@ -1263,8 +1263,8 @@ _wl_init()
1263 struct wl_registry *reg; 1263 struct wl_registry *reg;
1264 void *data; 1264 void *data;
1265 1265
1266 reg = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd); 1266 reg = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(e_comp_wl->wl.client_disp);
1267 itr = ecore_wl2_display_globals_get(ewd); 1267 itr = ecore_wl2_display_globals_get(e_comp_wl->wl.client_disp);
1268 EINA_ITERATOR_FOREACH(itr, data) 1268 EINA_ITERATOR_FOREACH(itr, data)
1269 { 1269 {
1270 global = (Ecore_Wl2_Global *)data; 1270 global = (Ecore_Wl2_Global *)data;