summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index cade757c77..4ca8ee90b0 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -8,6 +8,7 @@
8 8
9static Eina_Hash *_server_displays = NULL; 9static Eina_Hash *_server_displays = NULL;
10static Eina_Hash *_client_displays = NULL; 10static Eina_Hash *_client_displays = NULL;
11static Eina_Bool _shell_bound = EINA_FALSE;
11 12
12static Eina_Bool _cb_connect_idle(void *data); 13static Eina_Bool _cb_connect_idle(void *data);
13static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl); 14static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl);
@@ -152,12 +153,13 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
152 ewd->wl.data_device_manager = 153 ewd->wl.data_device_manager =
153 wl_registry_bind(registry, id, &wl_data_device_manager_interface, ewd->wl.data_device_manager_version); 154 wl_registry_bind(registry, id, &wl_data_device_manager_interface, ewd->wl.data_device_manager_version);
154 } 155 }
155 else if (!strcmp(interface, "wl_shell")) 156 else if ((!strcmp(interface, "wl_shell")) && (!_shell_bound))
156 { 157 {
157 ewd->wl.wl_shell = 158 ewd->wl.wl_shell =
158 wl_registry_bind(registry, id, &wl_shell_interface, 1); 159 wl_registry_bind(registry, id, &wl_shell_interface, 1);
160 _shell_bound = EINA_TRUE;
159 } 161 }
160 else if ((!strcmp(interface, "xdg_shell")) && 162 else if (((!strcmp(interface, "xdg_shell")) && (!_shell_bound)) &&
161 (!getenv("EFL_WAYLAND_DONT_USE_XDG_SHELL"))) 163 (!getenv("EFL_WAYLAND_DONT_USE_XDG_SHELL")))
162 { 164 {
163 Ecore_Wl2_Window *window; 165 Ecore_Wl2_Window *window;
@@ -168,6 +170,8 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
168 XDG_V5_UNSTABLE_VERSION); 170 XDG_V5_UNSTABLE_VERSION);
169 xdg_shell_add_listener(ewd->wl.xdg_shell, &_xdg_shell_listener, NULL); 171 xdg_shell_add_listener(ewd->wl.xdg_shell, &_xdg_shell_listener, NULL);
170 172
173 _shell_bound = EINA_TRUE;
174
171 EINA_INLIST_FOREACH(ewd->windows, window) 175 EINA_INLIST_FOREACH(ewd->windows, window)
172 if ((window->type != ECORE_WL2_WINDOW_TYPE_DND) && 176 if ((window->type != ECORE_WL2_WINDOW_TYPE_DND) &&
173 (window->type != ECORE_WL2_WINDOW_TYPE_NONE)) 177 (window->type != ECORE_WL2_WINDOW_TYPE_NONE))
@@ -175,12 +179,13 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
175 else 179 else
176 window->pending.configure = EINA_FALSE; 180 window->pending.configure = EINA_FALSE;
177 } 181 }
178 else if (!strcmp(interface, "zxdg_shell_v6")) 182 else if ((!strcmp(interface, "zxdg_shell_v6")) && (!_shell_bound))
179 { 183 {
180 ewd->wl.zxdg_shell = 184 ewd->wl.zxdg_shell =
181 wl_registry_bind(registry, id, &zxdg_shell_v6_interface, 1); 185 wl_registry_bind(registry, id, &zxdg_shell_v6_interface, 1);
182 zxdg_shell_v6_add_listener(ewd->wl.zxdg_shell, 186 zxdg_shell_v6_add_listener(ewd->wl.zxdg_shell,
183 &_zxdg_shell_listener, NULL); 187 &_zxdg_shell_listener, NULL);
188 _shell_bound = EINA_TRUE;
184 } 189 }
185 else if ((eina_streq(interface, "www")) && 190 else if ((eina_streq(interface, "www")) &&
186 (getenv("EFL_WAYLAND_ENABLE_WWW"))) 191 (getenv("EFL_WAYLAND_ENABLE_WWW")))