summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristopher Michael <devilhorns@comcast.net>2021-03-01 10:32:08 -0500
committerChristopher Michael <devilhorns@comcast.net>2021-03-01 10:32:08 -0500
commit350b65fc21fb413ea69b07d8dc12510eae38e846 (patch)
tree77965dddfbb05c1432242ca546c2814fb9ead8ae /src/lib
parentfbfcb4b309d264f8d8ad7fd239792c55acae4230 (diff)
ecore_wl2: Remove wayland wobbly windows stuffs
This cleans up the www mess that never worked properly and is unsupported with no plans to ever be used
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c10
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h21
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c69
3 files changed, 0 insertions, 100 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index 7344cf8b74..efaa25363c 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -307,15 +307,6 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
307 ewd->wl.data_device_manager = 307 ewd->wl.data_device_manager =
308 wl_registry_bind(registry, id, &wl_data_device_manager_interface, ewd->wl.data_device_manager_version); 308 wl_registry_bind(registry, id, &wl_data_device_manager_interface, ewd->wl.data_device_manager_version);
309 } 309 }
310 else if ((eina_streq(interface, "www")) &&
311 (getenv("EFL_WAYLAND_ENABLE_WWW")))
312 {
313 Ecore_Wl2_Window *window;
314
315 ewd->wl.www = wl_registry_bind(registry, id, &www_interface, 1);
316 EINA_INLIST_FOREACH(ewd->windows, window)
317 _ecore_wl2_window_www_surface_init(window);
318 }
319 else if ((!strcmp(interface, "zwp_e_session_recovery")) && 310 else if ((!strcmp(interface, "zwp_e_session_recovery")) &&
320 (!no_session_recovery)) 311 (!no_session_recovery))
321 { 312 {
@@ -452,7 +443,6 @@ _ecore_wl2_display_globals_cleanup(Ecore_Wl2_Display *ewd)
452{ 443{
453 if (ewd->wl.session_recovery) 444 if (ewd->wl.session_recovery)
454 zwp_e_session_recovery_destroy(ewd->wl.session_recovery); 445 zwp_e_session_recovery_destroy(ewd->wl.session_recovery);
455 if (ewd->wl.www) www_destroy(ewd->wl.www);
456 if (ewd->wl.xdg_wm_base) xdg_wm_base_destroy(ewd->wl.xdg_wm_base); 446 if (ewd->wl.xdg_wm_base) xdg_wm_base_destroy(ewd->wl.xdg_wm_base);
457 if (ewd->wl.zxdg_shell) zxdg_shell_v6_destroy(ewd->wl.zxdg_shell); 447 if (ewd->wl.zxdg_shell) zxdg_shell_v6_destroy(ewd->wl.zxdg_shell);
458 if (ewd->wl.shm) wl_shm_destroy(ewd->wl.shm); 448 if (ewd->wl.shm) wl_shm_destroy(ewd->wl.shm);
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index e4d19bd1e0..0a662e7884 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -5,7 +5,6 @@
5# include "Ecore_Wl2.h" 5# include "Ecore_Wl2.h"
6# include "Ecore_Input.h" 6# include "Ecore_Input.h"
7# include <xkbcommon/xkbcommon-compose.h> 7# include <xkbcommon/xkbcommon-compose.h>
8# include "www-client-protocol.h"
9# include "ecore_wl2_internal.h" 8# include "ecore_wl2_internal.h"
10 9
11# define EFL_TEAMWORK_VERSION 2 10# define EFL_TEAMWORK_VERSION 2
@@ -91,7 +90,6 @@ struct _Ecore_Wl2_Display
91 struct zwp_linux_dmabuf_v1 *dmabuf; 90 struct zwp_linux_dmabuf_v1 *dmabuf;
92 struct zxdg_shell_v6 *zxdg_shell; 91 struct zxdg_shell_v6 *zxdg_shell;
93 struct xdg_wm_base *xdg_wm_base; 92 struct xdg_wm_base *xdg_wm_base;
94 struct www *www;
95 struct zwp_e_session_recovery *session_recovery; 93 struct zwp_e_session_recovery *session_recovery;
96 struct efl_aux_hints *efl_aux_hints; 94 struct efl_aux_hints *efl_aux_hints;
97 struct zwp_teamwork *teamwork; 95 struct zwp_teamwork *teamwork;
@@ -182,7 +180,6 @@ struct _Ecore_Wl2_Window
182 struct wl_surface *surface; 180 struct wl_surface *surface;
183 void *buffer; 181 void *buffer;
184 struct wl_callback *callback; 182 struct wl_callback *callback;
185 struct www_surface *www_surface;
186 struct xdg_surface *xdg_surface; 183 struct xdg_surface *xdg_surface;
187 struct xdg_toplevel *xdg_toplevel; 184 struct xdg_toplevel *xdg_toplevel;
188 struct xdg_popup *xdg_popup; 185 struct xdg_popup *xdg_popup;
@@ -529,20 +526,6 @@ struct _Ecore_Wl2_Input
529 Eina_List *devices_list; 526 Eina_List *devices_list;
530}; 527};
531 528
532typedef struct Ecore_Wl2_Event_Window_WWW
533{
534 Ecore_Wl2_Window *window;
535 int x_rel;
536 int y_rel;
537 uint32_t timestamp;
538} Ecore_Wl2_Event_Window_WWW;
539
540typedef struct Ecore_Wl2_Event_Window_WWW_Drag
541{
542 Ecore_Wl2_Window *window;
543 Eina_Bool dragging;
544} Ecore_Wl2_Event_Window_WWW_Drag;
545
546typedef struct _Buffer_Handle Buffer_Handle; 529typedef struct _Buffer_Handle Buffer_Handle;
547typedef struct _Ecore_Wl2_Buffer 530typedef struct _Ecore_Wl2_Buffer
548{ 531{
@@ -573,9 +556,6 @@ typedef struct _Ecore_Wl2_Surface
573 Eina_Bool alpha : 1; 556 Eina_Bool alpha : 1;
574} Ecore_Wl2_Surface; 557} Ecore_Wl2_Surface;
575 558
576EAPI extern int _ecore_wl2_event_window_www;
577EAPI extern int _ecore_wl2_event_window_www_drag;
578
579Ecore_Wl2_Window *_ecore_wl2_display_window_surface_find(Ecore_Wl2_Display *display, struct wl_surface *wl_surface); 559Ecore_Wl2_Window *_ecore_wl2_display_window_surface_find(Ecore_Wl2_Display *display, struct wl_surface *wl_surface);
580void _display_event_free(void *d, void *event EINA_UNUSED); 560void _display_event_free(void *d, void *event EINA_UNUSED);
581 561
@@ -605,7 +585,6 @@ void _ecore_wl2_subsurf_free(Ecore_Wl2_Subsurface *subsurf);
605 585
606void _ecore_wl2_window_surface_create(Ecore_Wl2_Window *window); 586void _ecore_wl2_window_surface_create(Ecore_Wl2_Window *window);
607void _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window); 587void _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window);
608void _ecore_wl2_window_www_surface_init(Ecore_Wl2_Window *window);
609void _ecore_wl2_window_semi_free(Ecore_Wl2_Window *window); 588void _ecore_wl2_window_semi_free(Ecore_Wl2_Window *window);
610 589
611void _ecore_wl2_offer_unref(Ecore_Wl2_Offer *offer); 590void _ecore_wl2_offer_unref(Ecore_Wl2_Offer *offer);
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index e11e2e30a3..8c018ebd38 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -28,10 +28,6 @@ _ecore_wl2_window_semi_free(Ecore_Wl2_Window *window)
28 if (window->zxdg_surface) zxdg_surface_v6_destroy(window->zxdg_surface); 28 if (window->zxdg_surface) zxdg_surface_v6_destroy(window->zxdg_surface);
29 window->zxdg_surface = NULL; 29 window->zxdg_surface = NULL;
30 30
31 if (window->www_surface)
32 www_surface_destroy(window->www_surface);
33 window->www_surface = NULL;
34
35 if (window->surface) wl_surface_destroy(window->surface); 31 if (window->surface) wl_surface_destroy(window->surface);
36 window->surface = NULL; 32 window->surface = NULL;
37 window->surface_id = -1; 33 window->surface_id = -1;
@@ -132,70 +128,6 @@ _configure_complete(Ecore_Wl2_Window *window)
132#include "window_v6.x" 128#include "window_v6.x"
133 129
134static void 130static void
135_www_surface_end_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
136{
137 Ecore_Wl2_Window *window = data;
138 Ecore_Wl2_Event_Window_WWW_Drag *ev;
139
140 ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
141 EINA_SAFETY_ON_NULL_RETURN(ev);
142 ev->window = window;
143 ev->dragging = 0;
144
145 ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL);
146}
147
148static void
149_www_surface_start_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
150{
151 Ecore_Wl2_Window *window = data;
152 Ecore_Wl2_Event_Window_WWW_Drag *ev;
153
154 ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
155 EINA_SAFETY_ON_NULL_RETURN(ev);
156 ev->window = window;
157 ev->dragging = 1;
158
159 ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL);
160}
161
162static void
163_www_surface_status(void *data, struct www_surface *www_surface EINA_UNUSED, int32_t x_rel, int32_t y_rel, uint32_t timestamp)
164{
165 Ecore_Wl2_Window *window = data;
166 Ecore_Wl2_Event_Window_WWW *ev;
167
168 ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW));
169 EINA_SAFETY_ON_NULL_RETURN(ev);
170 ev->window = window;
171 ev->x_rel = x_rel;
172 ev->y_rel = y_rel;
173 ev->timestamp = timestamp;
174
175 ecore_event_add(_ecore_wl2_event_window_www, ev, NULL, NULL);
176}
177
178static struct www_surface_listener _www_surface_listener =
179{
180 .status = _www_surface_status,
181 .start_drag = _www_surface_start_drag,
182 .end_drag = _www_surface_end_drag,
183};
184
185void
186_ecore_wl2_window_www_surface_init(Ecore_Wl2_Window *window)
187{
188 if (!window->surface) return;
189 if (!window->display->wl.www) return;
190 if (window->www_surface) return;
191 window->www_surface = www_create(window->display->wl.www, window->surface);
192 www_surface_set_user_data(window->www_surface, window);
193 www_surface_add_listener(window->www_surface, &_www_surface_listener,
194 window);
195}
196
197
198static void
199_xdg_surface_cb_configure(void *data, struct xdg_surface *xdg_surface EINA_UNUSED, uint32_t serial) 131_xdg_surface_cb_configure(void *data, struct xdg_surface *xdg_surface EINA_UNUSED, uint32_t serial)
200{ 132{
201 Ecore_Wl2_Window *window; 133 Ecore_Wl2_Window *window;
@@ -639,7 +571,6 @@ ecore_wl2_window_show(Ecore_Wl2_Window *window)
639 (window->type != ECORE_WL2_WINDOW_TYPE_NONE)) 571 (window->type != ECORE_WL2_WINDOW_TYPE_NONE))
640 { 572 {
641 _ecore_wl2_window_shell_surface_init(window); 573 _ecore_wl2_window_shell_surface_init(window);
642 _ecore_wl2_window_www_surface_init(window);
643 _ecore_wl2_window_show_send(window); 574 _ecore_wl2_window_show_send(window);
644 } 575 }
645 else 576 else