summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-11 18:43:15 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-11 18:43:12 -0400
commitf00a49835d69aa5eb014e8b33fbc2723866d09ab (patch)
tree756f5d3996f7cc0589bd9dd01713526313619ee1 /src/lib/ecore_wl2
parent398ffe40a34eaab5e572b0eec47e4993c6238431 (diff)
wayland: remove xdg5 support
this has not been used or tested since last year and there are no major compositors which lack xdg6 support
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c39
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h7
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c233
3 files changed, 8 insertions, 271 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index 63c79f9d07..57f98cdcfc 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -46,17 +46,6 @@ _ecore_wl2_display_signal_exit(void)
46} 46}
47 47
48static void 48static void
49_xdg_shell_cb_ping(void *data EINA_UNUSED, struct xdg_shell *shell, uint32_t serial)
50{
51 xdg_shell_pong(shell, serial);
52}
53
54static const struct xdg_shell_listener _xdg_shell_listener =
55{
56 _xdg_shell_cb_ping
57};
58
59static void
60_dmabuf_cb_format(void *data EINA_UNUSED, struct zwp_linux_dmabuf_v1 *dmabuf EINA_UNUSED, uint32_t format EINA_UNUSED) 49_dmabuf_cb_format(void *data EINA_UNUSED, struct zwp_linux_dmabuf_v1 *dmabuf EINA_UNUSED, uint32_t format EINA_UNUSED)
61{ 50{
62 /* It would be awfully nice if this actually happened */ 51 /* It would be awfully nice if this actually happened */
@@ -440,7 +429,6 @@ _ecore_wl2_display_globals_cleanup(Ecore_Wl2_Display *ewd)
440 zwp_e_session_recovery_destroy(ewd->wl.session_recovery); 429 zwp_e_session_recovery_destroy(ewd->wl.session_recovery);
441 if (ewd->wl.www) www_destroy(ewd->wl.www); 430 if (ewd->wl.www) www_destroy(ewd->wl.www);
442 if (ewd->wl.zxdg_shell) zxdg_shell_v6_destroy(ewd->wl.zxdg_shell); 431 if (ewd->wl.zxdg_shell) zxdg_shell_v6_destroy(ewd->wl.zxdg_shell);
443 if (ewd->wl.xdg_shell) xdg_shell_destroy(ewd->wl.xdg_shell);
444 if (ewd->wl.shm) wl_shm_destroy(ewd->wl.shm); 432 if (ewd->wl.shm) wl_shm_destroy(ewd->wl.shm);
445 if (ewd->wl.data_device_manager) 433 if (ewd->wl.data_device_manager)
446 wl_data_device_manager_destroy(ewd->wl.data_device_manager); 434 wl_data_device_manager_destroy(ewd->wl.data_device_manager);
@@ -487,7 +475,9 @@ _recovery_timer_add(Ecore_Wl2_Display *ewd)
487 _ecore_wl2_subsurf_unmap(subsurf); 475 _ecore_wl2_subsurf_unmap(subsurf);
488 _ecore_wl2_window_semi_free(window); 476 _ecore_wl2_window_semi_free(window);
489 window->configure_serial = 0; 477 window->configure_serial = 0;
490 window->configure_ack = NULL; 478 window->zxdg_configure_ack = NULL;
479 window->zxdg_set_min_size = NULL;
480 window->zxdg_set_max_size = NULL;
491 } 481 }
492 482
493 ewd->recovery_timer = 483 ewd->recovery_timer =
@@ -615,7 +605,6 @@ _ecore_wl2_shell_bind(Ecore_Wl2_Display *ewd)
615 const char *shells[] = 605 const char *shells[] =
616 { 606 {
617 "zxdg_shell_v6", 607 "zxdg_shell_v6",
618 "xdg_shell",
619 NULL 608 NULL
620 }; 609 };
621 610
@@ -630,27 +619,7 @@ _ecore_wl2_shell_bind(Ecore_Wl2_Display *ewd)
630 619
631 if (!global) return; 620 if (!global) return;
632 621
633 if ((!strcmp(global->interface, "xdg_shell")) && 622 if (!strcmp(global->interface, "zxdg_shell_v6"))
634 (!getenv("EFL_WAYLAND_DONT_USE_XDG_SHELL")))
635 {
636 Ecore_Wl2_Window *window;
637
638 ewd->wl.xdg_shell =
639 wl_registry_bind(ewd->wl.registry, global->id,
640 &xdg_shell_interface, 1);
641 xdg_shell_use_unstable_version(ewd->wl.xdg_shell,
642 XDG_V5_UNSTABLE_VERSION);
643 xdg_shell_add_listener(ewd->wl.xdg_shell, &_xdg_shell_listener, NULL);
644 ewd->shell_done = EINA_TRUE;
645
646 EINA_INLIST_FOREACH(ewd->windows, window)
647 if ((window->type != ECORE_WL2_WINDOW_TYPE_DND) &&
648 (window->type != ECORE_WL2_WINDOW_TYPE_NONE))
649 _ecore_wl2_window_shell_surface_init(window);
650 else
651 window->pending.configure = EINA_FALSE;
652 }
653 else if (!strcmp(global->interface, "zxdg_shell_v6"))
654 { 623 {
655 ewd->wl.zxdg_shell = 624 ewd->wl.zxdg_shell =
656 wl_registry_bind(ewd->wl.registry, global->id, 625 wl_registry_bind(ewd->wl.registry, global->id,
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index e857bbdec4..0f664097f7 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -10,9 +10,6 @@
10#define EFL_TEAMWORK_VERSION 2 10#define EFL_TEAMWORK_VERSION 2
11# include "teamwork-client-protocol.h" 11# include "teamwork-client-protocol.h"
12 12
13# include "xdg-shell-unstable-v5-client-protocol.h"
14# define XDG_V5_UNSTABLE_VERSION 5
15
16# include "session-recovery-client-protocol.h" 13# include "session-recovery-client-protocol.h"
17 14
18# include "xdg-shell-unstable-v6-client-protocol.h" 15# include "xdg-shell-unstable-v6-client-protocol.h"
@@ -90,7 +87,6 @@ struct _Ecore_Wl2_Display
90 int data_device_manager_version; 87 int data_device_manager_version;
91 struct wl_shm *shm; 88 struct wl_shm *shm;
92 struct zwp_linux_dmabuf_v1 *dmabuf; 89 struct zwp_linux_dmabuf_v1 *dmabuf;
93 struct xdg_shell *xdg_shell;
94 struct zxdg_shell_v6 *zxdg_shell; 90 struct zxdg_shell_v6 *zxdg_shell;
95 struct www *www; 91 struct www *www;
96 struct zwp_e_session_recovery *session_recovery; 92 struct zwp_e_session_recovery *session_recovery;
@@ -159,8 +155,6 @@ struct _Ecore_Wl2_Window
159 const char *role; 155 const char *role;
160 156
161 struct wl_surface *surface; 157 struct wl_surface *surface;
162 struct xdg_surface *xdg_surface;
163 struct xdg_popup *xdg_popup;
164 struct www_surface *www_surface; 158 struct www_surface *www_surface;
165 struct zxdg_surface_v6 *zxdg_surface; 159 struct zxdg_surface_v6 *zxdg_surface;
166 struct zxdg_toplevel_v6 *zxdg_toplevel; 160 struct zxdg_toplevel_v6 *zxdg_toplevel;
@@ -169,7 +163,6 @@ struct _Ecore_Wl2_Window
169 Eina_Stringshare *uuid; 163 Eina_Stringshare *uuid;
170 164
171 uint32_t configure_serial; 165 uint32_t configure_serial;
172 void (*configure_ack)(struct xdg_surface *surface, uint32_t serial);
173 void (*zxdg_configure_ack)(struct zxdg_surface_v6 *surface, uint32_t serial); 166 void (*zxdg_configure_ack)(struct zxdg_surface_v6 *surface, uint32_t serial);
174 void (*zxdg_set_min_size)(struct zxdg_toplevel_v6 *toplevel, int32_t w, int32_t h); 167 void (*zxdg_set_min_size)(struct zxdg_toplevel_v6 *toplevel, int32_t w, int32_t h);
175 void (*zxdg_set_max_size)(struct zxdg_toplevel_v6 *toplevel, int32_t w, int32_t h); 168 void (*zxdg_set_max_size)(struct zxdg_toplevel_v6 *toplevel, int32_t w, int32_t h);
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index b7b4450afc..6ee7af6af8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -17,12 +17,6 @@ _ecore_wl2_window_semi_free(Ecore_Wl2_Window *window)
17 if (window->zxdg_surface) zxdg_surface_v6_destroy(window->zxdg_surface); 17 if (window->zxdg_surface) zxdg_surface_v6_destroy(window->zxdg_surface);
18 window->zxdg_surface = NULL; 18 window->zxdg_surface = NULL;
19 19
20 if (window->xdg_surface) xdg_surface_destroy(window->xdg_surface);
21 window->xdg_surface = NULL;
22
23 if (window->xdg_popup) xdg_popup_destroy(window->xdg_popup);
24 window->xdg_popup = NULL;
25
26 if (window->www_surface) 20 if (window->www_surface)
27 www_surface_destroy(window->www_surface); 21 www_surface_destroy(window->www_surface);
28 window->www_surface = NULL; 22 window->www_surface = NULL;
@@ -85,95 +79,6 @@ _ecore_wl2_window_deactivate_send(Ecore_Wl2_Window *window)
85} 79}
86 80
87static void 81static void
88_xdg_popup_cb_done(void *data, struct xdg_popup *xdg_popup EINA_UNUSED)
89{
90 Ecore_Wl2_Window *win;
91
92 win = data;
93 if (!win) return;
94
95 if (win->grab) _ecore_wl2_input_ungrab(win->grab);
96}
97
98static const struct xdg_popup_listener _xdg_popup_listener =
99{
100 _xdg_popup_cb_done,
101};
102
103static void
104_xdg_surface_cb_configure(void *data, struct xdg_surface *xdg_surface EINA_UNUSED, int32_t w, int32_t h, struct wl_array *states, uint32_t serial)
105{
106 Ecore_Wl2_Window *win = data;
107 uint32_t *s;
108 Eina_Bool fs, max;
109
110 if ((!win->maximized) && (!win->fullscreen))
111 win->saved = win->geometry;
112
113 fs = win->fullscreen;
114 max = win->maximized;
115
116 win->minimized = EINA_FALSE;
117 win->maximized = EINA_FALSE;
118 win->fullscreen = EINA_FALSE;
119 win->focused = EINA_FALSE;
120 win->resizing = EINA_FALSE;
121
122 wl_array_for_each(s, states)
123 {
124 switch (*s)
125 {
126 case XDG_SURFACE_STATE_MAXIMIZED:
127 win->maximized = EINA_TRUE;
128 break;
129 case XDG_SURFACE_STATE_FULLSCREEN:
130 win->fullscreen = EINA_TRUE;
131 break;
132 case XDG_SURFACE_STATE_RESIZING:
133 win->resizing = EINA_TRUE;
134 break;
135 case XDG_SURFACE_STATE_ACTIVATED:
136 win->focused = EINA_TRUE;
137 win->minimized = EINA_FALSE;
138 default:
139 break;
140 }
141 }
142
143 win->configure_serial = serial;
144 if ((win->geometry.w == w) && (win->geometry.h == h))
145 w = h = 0;
146 else if ((!w) && (!h) && (!win->fullscreen) && (!win->maximized) &&
147 ((win->fullscreen != fs) || (win->maximized != max)))
148 w = win->saved.w, h = win->saved.h;
149
150 _ecore_wl2_window_configure_send(win, w, h, !!win->resizing,
151 win->fullscreen, win->maximized);
152
153 if (win->focused)
154 _ecore_wl2_window_activate_send(win);
155 else
156 _ecore_wl2_window_deactivate_send(win);
157}
158
159static void
160_xdg_surface_cb_delete(void *data, struct xdg_surface *xdg_surface EINA_UNUSED)
161{
162 Ecore_Wl2_Window *win;
163
164 win = data;
165 if (!win) return;
166
167 ecore_wl2_window_free(win);
168}
169
170static const struct xdg_surface_listener _xdg_surface_listener =
171{
172 _xdg_surface_cb_configure,
173 _xdg_surface_cb_delete,
174};
175
176static void
177_zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA_UNUSED, uint32_t serial) 82_zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA_UNUSED, uint32_t serial)
178{ 83{
179 Ecore_Wl2_Window *window; 84 Ecore_Wl2_Window *window;
@@ -324,54 +229,6 @@ _ecore_wl2_window_zxdg_popup_create(Ecore_Wl2_Window *win)
324} 229}
325 230
326static void 231static void
327_ecore_wl2_window_type_set(Ecore_Wl2_Window *win)
328{
329 switch (win->type)
330 {
331 case ECORE_WL2_WINDOW_TYPE_MENU:
332 {
333 if (win->zxdg_surface)
334 _ecore_wl2_window_zxdg_popup_create(win);
335 else if (win->xdg_surface)
336 {
337 EINA_SAFETY_ON_TRUE_RETURN(!win->parent);
338 EINA_SAFETY_ON_TRUE_RETURN(!win->grab);
339 win->xdg_popup =
340 xdg_shell_get_xdg_popup(win->display->wl.xdg_shell,
341 win->surface, win->parent->surface,
342 win->grab->wl.seat,
343 wl_display_get_serial(win->display->wl.display),
344 win->geometry.x, win->geometry.y);
345 if (!win->xdg_popup)
346 {
347 ERR("Could not create xdg popup");
348 return;
349 }
350
351 xdg_popup_set_user_data(win->xdg_popup, win);
352 xdg_popup_add_listener(win->xdg_popup,
353 &_xdg_popup_listener, win);
354 }
355 }
356 break;
357 case ECORE_WL2_WINDOW_TYPE_TOPLEVEL:
358 if (win->zxdg_surface)
359 {
360 struct zxdg_toplevel_v6 *ptop = NULL;
361
362 if (win->parent)
363 ptop = win->parent->zxdg_toplevel;
364
365 if (ptop)
366 zxdg_toplevel_v6_set_parent(win->zxdg_toplevel, ptop);
367 }
368 break;
369 default:
370 break;
371 }
372}
373
374static void
375_www_surface_end_drag(void *data, struct www_surface *www_surface EINA_UNUSED) 232_www_surface_end_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
376{ 233{
377 Ecore_Wl2_Window *window = data; 234 Ecore_Wl2_Window *window = data;
@@ -490,31 +347,6 @@ _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window)
490 347
491 wl_surface_commit(window->surface); 348 wl_surface_commit(window->surface);
492 } 349 }
493 else if ((window->display->wl.xdg_shell) && (!window->xdg_surface))
494 {
495 window->xdg_surface =
496 xdg_shell_get_xdg_surface(window->display->wl.xdg_shell,
497 window->surface);
498 if (!window->xdg_surface) goto surf_err;
499
500 if (window->title)
501 xdg_surface_set_title(window->xdg_surface, window->title);
502 if (window->class)
503 xdg_surface_set_app_id(window->xdg_surface, window->class);
504
505 xdg_surface_set_user_data(window->xdg_surface, window);
506 xdg_surface_add_listener(window->xdg_surface,
507 &_xdg_surface_listener, window);
508
509 window->configure_ack = xdg_surface_ack_configure;
510 window->pending.configure = EINA_FALSE;
511 if (window->maximized)
512 xdg_surface_set_maximized(window->xdg_surface);
513 if (window->fullscreen)
514 xdg_surface_set_fullscreen(window->xdg_surface, NULL);
515
516 _ecore_wl2_window_type_set(window);
517 }
518 350
519 if (window->display->wl.session_recovery) 351 if (window->display->wl.session_recovery)
520 { 352 {
@@ -528,12 +360,6 @@ _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window)
528 window->geometry.y, 360 window->geometry.y,
529 window->geometry.w, 361 window->geometry.w,
530 window->geometry.h); 362 window->geometry.h);
531 else if (window->xdg_surface)
532 xdg_surface_set_window_geometry(window->xdg_surface,
533 window->geometry.x,
534 window->geometry.y,
535 window->geometry.w,
536 window->geometry.h);
537 363
538 ecore_wl2_window_opaque_region_set(window, 364 ecore_wl2_window_opaque_region_set(window,
539 window->opaque.x, 365 window->opaque.x,
@@ -544,11 +370,6 @@ _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window)
544 else 370 else
545 zwp_e_session_recovery_get_uuid(window->display->wl.session_recovery, window->surface); 371 zwp_e_session_recovery_get_uuid(window->display->wl.session_recovery, window->surface);
546 } 372 }
547
548 return;
549
550surf_err:
551 ERR("Failed to create surface for window");
552} 373}
553 374
554void 375void
@@ -717,7 +538,9 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window)
717 } 538 }
718 539
719 window->configure_serial = 0; 540 window->configure_serial = 0;
720 window->configure_ack = NULL; 541 window->zxdg_configure_ack = NULL;
542 window->zxdg_set_min_size = NULL;
543 window->zxdg_set_max_size = NULL;
721} 544}
722 545
723static void 546static void
@@ -781,9 +604,6 @@ ecore_wl2_window_move(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input)
781 if (window->zxdg_toplevel) 604 if (window->zxdg_toplevel)
782 zxdg_toplevel_v6_move(window->zxdg_toplevel, input->wl.seat, 605 zxdg_toplevel_v6_move(window->zxdg_toplevel, input->wl.seat,
783 window->display->serial); 606 window->display->serial);
784 else if (window->xdg_surface)
785 xdg_surface_move(window->xdg_surface, input->wl.seat,
786 window->display->serial);
787} 607}
788 608
789EAPI void 609EAPI void
@@ -797,9 +617,6 @@ ecore_wl2_window_resize(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input, int lo
797 if (window->zxdg_toplevel) 617 if (window->zxdg_toplevel)
798 zxdg_toplevel_v6_resize(window->zxdg_toplevel, input->wl.seat, 618 zxdg_toplevel_v6_resize(window->zxdg_toplevel, input->wl.seat,
799 window->display->serial, location); 619 window->display->serial, location);
800 else if (window->xdg_surface)
801 xdg_surface_resize(window->xdg_surface, input->wl.seat,
802 window->display->serial, location);
803} 620}
804 621
805EAPI void 622EAPI void
@@ -820,19 +637,6 @@ ecore_wl2_window_raise(Ecore_Wl2_Window *window)
820 window->geometry.h, &states); 637 window->geometry.h, &states);
821 wl_array_release(&states); 638 wl_array_release(&states);
822 } 639 }
823 else if (window->xdg_surface)
824 {
825 struct wl_array states;
826 uint32_t *s;
827
828 wl_array_init(&states);
829 s = wl_array_add(&states, sizeof(*s));
830 *s = XDG_SURFACE_STATE_ACTIVATED;
831 _xdg_surface_cb_configure(window, window->xdg_surface,
832 window->geometry.w, window->geometry.h,
833 &states, 0);
834 wl_array_release(&states);
835 }
836} 640}
837 641
838EAPI Eina_Bool 642EAPI Eina_Bool
@@ -1046,15 +850,11 @@ ecore_wl2_window_maximized_set(Ecore_Wl2_Window *window, Eina_Bool maximized)
1046 850
1047 if (window->zxdg_toplevel) 851 if (window->zxdg_toplevel)
1048 zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel); 852 zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel);
1049 else if (window->xdg_surface)
1050 xdg_surface_set_maximized(window->xdg_surface);
1051 } 853 }
1052 else 854 else
1053 { 855 {
1054 if (window->zxdg_toplevel) 856 if (window->zxdg_toplevel)
1055 zxdg_toplevel_v6_unset_maximized(window->zxdg_toplevel); 857 zxdg_toplevel_v6_unset_maximized(window->zxdg_toplevel);
1056 else if (window->xdg_surface)
1057 xdg_surface_unset_maximized(window->xdg_surface);
1058 } 858 }
1059} 859}
1060 860
@@ -1086,15 +886,11 @@ ecore_wl2_window_fullscreen_set(Ecore_Wl2_Window *window, Eina_Bool fullscreen)
1086 886
1087 if (window->zxdg_toplevel) 887 if (window->zxdg_toplevel)
1088 zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL); 888 zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL);
1089 else if (window->xdg_surface)
1090 xdg_surface_set_fullscreen(window->xdg_surface, NULL);
1091 } 889 }
1092 else 890 else
1093 { 891 {
1094 if (window->zxdg_toplevel) 892 if (window->zxdg_toplevel)
1095 zxdg_toplevel_v6_unset_fullscreen(window->zxdg_toplevel); 893 zxdg_toplevel_v6_unset_fullscreen(window->zxdg_toplevel);
1096 else if (window->xdg_surface)
1097 xdg_surface_unset_fullscreen(window->xdg_surface);
1098 } 894 }
1099} 895}
1100 896
@@ -1124,8 +920,6 @@ ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title)
1124 920
1125 if (window->zxdg_toplevel) 921 if (window->zxdg_toplevel)
1126 zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title); 922 zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title);
1127 else if (window->xdg_surface)
1128 xdg_surface_set_title(window->xdg_surface, window->title);
1129} 923}
1130 924
1131EAPI void 925EAPI void
@@ -1138,8 +932,6 @@ ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas)
1138 932
1139 if (window->zxdg_toplevel) 933 if (window->zxdg_toplevel)
1140 zxdg_toplevel_v6_set_app_id(window->zxdg_toplevel, window->class); 934 zxdg_toplevel_v6_set_app_id(window->zxdg_toplevel, window->class);
1141 else if (window->xdg_surface)
1142 xdg_surface_set_app_id(window->xdg_surface, window->class);
1143} 935}
1144 936
1145EAPI void 937EAPI void
@@ -1169,8 +961,6 @@ ecore_wl2_window_geometry_set(Ecore_Wl2_Window *window, int x, int y, int w, int
1169 961
1170 if (window->zxdg_toplevel) 962 if (window->zxdg_toplevel)
1171 zxdg_surface_v6_set_window_geometry(window->zxdg_surface, x, y, w, h); 963 zxdg_surface_v6_set_window_geometry(window->zxdg_surface, x, y, w, h);
1172 else if (window->xdg_surface)
1173 xdg_surface_set_window_geometry(window->xdg_surface, x, y, w, h);
1174} 964}
1175 965
1176EAPI Eina_Bool 966EAPI Eina_Bool
@@ -1198,8 +988,6 @@ ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified)
1198 { 988 {
1199 if (window->zxdg_toplevel) 989 if (window->zxdg_toplevel)
1200 zxdg_toplevel_v6_set_minimized(window->zxdg_toplevel); 990 zxdg_toplevel_v6_set_minimized(window->zxdg_toplevel);
1201 else if (window->xdg_surface)
1202 xdg_surface_set_minimized(window->xdg_surface);
1203 } 991 }
1204 else 992 else
1205 { 993 {
@@ -1216,19 +1004,6 @@ ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified)
1216 window->geometry.h, &states); 1004 window->geometry.h, &states);
1217 wl_array_release(&states); 1005 wl_array_release(&states);
1218 } 1006 }
1219 else if (window->xdg_surface)
1220 {
1221 struct wl_array states;
1222 uint32_t *s;
1223
1224 wl_array_init(&states);
1225 s = wl_array_add(&states, sizeof(*s));
1226 *s = XDG_SURFACE_STATE_ACTIVATED;
1227 _xdg_surface_cb_configure(window, window->xdg_surface,
1228 window->geometry.w, window->geometry.h,
1229 &states, 0);
1230 wl_array_release(&states);
1231 }
1232 } 1007 }
1233} 1008}
1234 1009
@@ -1260,7 +1035,7 @@ ecore_wl2_window_shell_surface_exists(Ecore_Wl2_Window *window)
1260{ 1035{
1261 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE); 1036 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE);
1262 1037
1263 return (window->xdg_surface || window->zxdg_surface); 1038 return !!window->zxdg_surface;
1264} 1039}
1265 1040
1266EAPI Eina_Bool 1041EAPI Eina_Bool