summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-12-07 09:46:11 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-02 13:32:31 -0500
commit96b55ce441d68c7a23a15a344c850d92a35af544 (patch)
tree562b1b5cac93ad3c183c34fafd802eb33ae110d5
parentbe2221ed9542ac54bc27bee90a3d0ed051c2aca7 (diff)
Fix using global ewd variable by making it part of e_comp_wl
ref T2919 Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/bin/e_comp_wl.c11
-rw-r--r--src/bin/e_comp_wl.h4
-rw-r--r--src/bin/e_grabinput.c1
-rw-r--r--src/modules/wl_weekeyboard/e_mod_main.c6
4 files changed, 10 insertions, 12 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 4fee9dc15..52504de8e 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -14,7 +14,6 @@
14#endif 14#endif
15 15
16E_API int E_EVENT_WAYLAND_GLOBAL_ADD = -1; 16E_API int E_EVENT_WAYLAND_GLOBAL_ADD = -1;
17E_API Ecore_Wl2_Display *ewd = NULL;
18 17
19#include "session-recovery-server-protocol.h" 18#include "session-recovery-server-protocol.h"
20 19
@@ -2542,15 +2541,15 @@ _e_comp_wl_compositor_create(void)
2542 /* wl_log_set_handler_server(_e_comp_wl_log_cb_print); */ 2541 /* wl_log_set_handler_server(_e_comp_wl_log_cb_print); */
2543 2542
2544 /* try to create an ecore_wl2 display */ 2543 /* try to create an ecore_wl2 display */
2545 ewd = ecore_wl2_display_create(NULL); 2544 cdata->ewd = ecore_wl2_display_create(NULL);
2546 if (!ewd) 2545 if (!cdata->ewd)
2547 { 2546 {
2548 ERR("Could not create a Wayland display: %m"); 2547 ERR("Could not create a Wayland display: %m");
2549 free(cdata); 2548 free(cdata);
2550 return EINA_FALSE; 2549 return EINA_FALSE;
2551 } 2550 }
2552 2551
2553 cdata->wl.disp = ecore_wl2_display_get(ewd); 2552 cdata->wl.disp = ecore_wl2_display_get(cdata->ewd);
2554 if (!cdata->wl.disp) 2553 if (!cdata->wl.disp)
2555 { 2554 {
2556 ERR("Could not create a Wayland display: %m"); 2555 ERR("Could not create a Wayland display: %m");
@@ -2677,7 +2676,7 @@ data_err:
2677comp_global_err: 2676comp_global_err:
2678 /* e_env_unset("WAYLAND_DISPLAY"); */ 2677 /* e_env_unset("WAYLAND_DISPLAY"); */
2679/* sock_err: */ 2678/* sock_err: */
2680 ecore_wl2_display_destroy(ewd); 2679 ecore_wl2_display_destroy(cdata->ewd);
2681disp_err: 2680disp_err:
2682 free(cdata); 2681 free(cdata);
2683 return EINA_FALSE; 2682 return EINA_FALSE;
@@ -2839,7 +2838,7 @@ e_comp_wl_shutdown(void)
2839 if (e_comp_wl->wl.shm) wl_shm_destroy(e_comp_wl->wl.shm); 2838 if (e_comp_wl->wl.shm) wl_shm_destroy(e_comp_wl->wl.shm);
2840 _e_comp_wl_gl_shutdown(); 2839 _e_comp_wl_gl_shutdown();
2841 2840
2842 ecore_wl2_display_destroy(ewd); 2841 ecore_wl2_display_destroy(e_comp_wl->ewd);
2843 2842
2844 /* shutdown ecore_wayland */ 2843 /* shutdown ecore_wayland */
2845 ecore_wl2_shutdown(); 2844 ecore_wl2_shutdown();
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index 1493d14e9..41dcdae4f 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -99,6 +99,8 @@ struct _E_Comp_Wl_Subsurf_Data
99 99
100struct _E_Comp_Wl_Data 100struct _E_Comp_Wl_Data
101{ 101{
102 Ecore_Wl2_Display *ewd;
103
102 struct 104 struct
103 { 105 {
104 struct wl_display *disp; 106 struct wl_display *disp;
@@ -341,8 +343,6 @@ E_API Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timest
341 343
342E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD; 344E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD;
343 345
344E_API extern Ecore_Wl2_Display *ewd;
345
346# ifndef HAVE_WAYLAND_ONLY 346# ifndef HAVE_WAYLAND_ONLY
347EINTERN void e_comp_wl_xwayland_client_queue(E_Client *ec); 347EINTERN void e_comp_wl_xwayland_client_queue(E_Client *ec);
348static inline E_Comp_X_Client_Data * 348static inline E_Comp_X_Client_Data *
diff --git a/src/bin/e_grabinput.c b/src/bin/e_grabinput.c
index c050a0825..6bf585208 100644
--- a/src/bin/e_grabinput.c
+++ b/src/bin/e_grabinput.c
@@ -189,7 +189,6 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
189 case E_FOCUS_METHOD_PASSIVE: 189 case E_FOCUS_METHOD_PASSIVE:
190#ifndef HAVE_WAYLAND_ONLY 190#ifndef HAVE_WAYLAND_ONLY
191 if (e_comp_util_has_x()) 191 if (e_comp_util_has_x())
192 ecore_x_window_focus(win);
193#endif 192#endif
194 break; 193 break;
195 194
diff --git a/src/modules/wl_weekeyboard/e_mod_main.c b/src/modules/wl_weekeyboard/e_mod_main.c
index 060a5a76d..5a45aeabe 100644
--- a/src/modules/wl_weekeyboard/e_mod_main.c
+++ b/src/modules/wl_weekeyboard/e_mod_main.c
@@ -250,7 +250,7 @@ _wkb_ui_setup(struct weekeyboard *wkb)
250 250
251 if (eina_streq(wkb->theme, "default")) 251 if (eina_streq(wkb->theme, "default"))
252 { 252 {
253 ecore_wl2_display_screen_size_get(ewd, &w, &h); 253 ecore_wl2_display_screen_size_get(e_comp_wl->ewd, &w, &h);
254 DBG("Screen size: w=%d, h=%d", w, h); 254 DBG("Screen size: w=%d, h=%d", w, h);
255 if (w >= 1080) 255 if (w >= 1080)
256 w = 1080; 256 w = 1080;
@@ -507,8 +507,8 @@ _wkb_setup(struct weekeyboard *wkb)
507 struct wl_input_panel_surface *ips; 507 struct wl_input_panel_surface *ips;
508 void *data; 508 void *data;
509 509
510 registry = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd); 510 registry = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(e_comp_wl->ewd);
511 itr = ecore_wl2_display_globals_get(ewd); 511 itr = ecore_wl2_display_globals_get(e_comp_wl->ewd);
512 EINA_ITERATOR_FOREACH(itr, data) 512 EINA_ITERATOR_FOREACH(itr, data)
513 { 513 {
514 global = (Ecore_Wl2_Global *)data; 514 global = (Ecore_Wl2_Global *)data;