aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-08 13:42:11 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-10 11:39:52 -0500
commitffa276fce3b812372a063431903fa0569d71fcb2 (patch)
treece5945fe3c5a1ef486340dc0b2a1bd4735e9dc27 /src
parentefl-wl: move to xdg-shell vfinal (diff)
downloadefl-ffa276fce3b812372a063431903fa0569d71fcb2.tar.gz
wayland: add xdg-shell vfinal support for client-side
@feature
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Ecore_Wl2.am6
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c33
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h10
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c388
-rw-r--r--src/lib/ecore_wl2/window_v6.x188
-rw-r--r--src/lib/elementary/efl_ui_win.c5
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c34
-rw-r--r--src/wayland_protocol/efl-hints.xml4
8 files changed, 510 insertions, 158 deletions
diff --git a/src/Makefile_Ecore_Wl2.am b/src/Makefile_Ecore_Wl2.am
index a794d0b3ba..311cd27eec 100644
--- a/src/Makefile_Ecore_Wl2.am
+++ b/src/Makefile_Ecore_Wl2.am
@@ -40,6 +40,8 @@ lib/ecore_wl2/www-client-protocol.h \
lib/ecore_wl2/www-protocol.c \
lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c \
lib/ecore_wl2/linux-dmabuf-unstable-v1-client-protocol.h \
+lib/ecore_wl2/xdg-shell-client-protocol.h \
+lib/ecore_wl2/xdg-shell-protocol.c \
lib/ecore_wl2/xdg-shell-unstable-v6-client-protocol.h \
lib/ecore_wl2/xdg-shell-unstable-v6-protocol.c \
lib/ecore_wl2/text-input-unstable-v1-client-protocol.h \
@@ -59,6 +61,8 @@ lib/ecore_wl2/efl-aux-hints-client-protocol.h \
lib/ecore_wl2/www-protocol.c \
lib/ecore_wl2/teamwork-protocol.c \
lib/ecore_wl2/teamwork-client-protocol.h \
+ lib/ecore_wl2/xdg-shell-client-protocol.h \
+ lib/ecore_wl2/xdg-shell-protocol.c \
lib/ecore_wl2/xdg-shell-unstable-v6-client-protocol.h \
lib/ecore_wl2/xdg-shell-unstable-v6-protocol.c \
lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c \
@@ -70,4 +74,6 @@ lib/ecore_wl2/efl-aux-hints-client-protocol.h \
lib/ecore_wl2/efl-hints-client-protocol.h \
lib/ecore_wl2/efl-hints-protocol.c
+EXTRA_DIST2 += lib/ecore_wl2/window_v6.x
+
endif
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index 9785406d97..740090c23a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -59,6 +59,17 @@ static const struct zwp_linux_dmabuf_v1_listener _dmabuf_listener =
};
static void
+_xdg_shell_cb_ping(void *data EINA_UNUSED, struct xdg_wm_base *shell, uint32_t serial)
+{
+ xdg_wm_base_pong(shell, serial);
+}
+
+static const struct xdg_wm_base_listener _xdg_shell_listener =
+{
+ _xdg_shell_cb_ping,
+};
+
+static void
_zxdg_shell_cb_ping(void *data EINA_UNUSED, struct zxdg_shell_v6 *shell, uint32_t serial)
{
zxdg_shell_v6_pong(shell, serial);
@@ -337,13 +348,13 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
ewd->wl.efl_hints = wl_registry_bind(registry, id, &efl_hints_interface, MIN(version, 2));
EINA_INLIST_FOREACH(ewd->windows, window)
{
- if (!window->zxdg_surface) continue;
+ if (!window->xdg_surface) continue;
if (window->aspect.set)
- efl_hints_set_aspect(window->display->wl.efl_hints, window->zxdg_surface,
+ efl_hints_set_aspect(window->display->wl.efl_hints, window->xdg_surface,
window->aspect.w, window->aspect.h, window->aspect.aspect);
if (window->weight.set)
efl_hints_set_weight(window->display->wl.efl_hints,
- window->zxdg_surface, window->weight.w, window->weight.h);
+ window->xdg_surface, window->weight.w, window->weight.h);
}
}
@@ -438,6 +449,7 @@ _ecore_wl2_display_globals_cleanup(Ecore_Wl2_Display *ewd)
if (ewd->wl.session_recovery)
zwp_e_session_recovery_destroy(ewd->wl.session_recovery);
if (ewd->wl.www) www_destroy(ewd->wl.www);
+ if (ewd->wl.xdg_wm_base) xdg_wm_base_destroy(ewd->wl.xdg_wm_base);
if (ewd->wl.zxdg_shell) zxdg_shell_v6_destroy(ewd->wl.zxdg_shell);
if (ewd->wl.shm) wl_shm_destroy(ewd->wl.shm);
if (ewd->wl.data_device_manager)
@@ -488,6 +500,9 @@ _recovery_timer_add(Ecore_Wl2_Display *ewd)
_ecore_wl2_window_semi_free(window);
window->set_config.serial = 0;
window->req_config.serial = 0;
+ window->xdg_configure_ack = NULL;
+ window->xdg_set_min_size = NULL;
+ window->xdg_set_max_size = NULL;
window->zxdg_configure_ack = NULL;
window->zxdg_set_min_size = NULL;
window->zxdg_set_max_size = NULL;
@@ -611,6 +626,7 @@ _ecore_wl2_shell_bind(Ecore_Wl2_Display *ewd)
const char **itr;
const char *shells[] =
{
+ "xdg_wm_base",
"zxdg_shell_v6",
NULL
};
@@ -626,7 +642,16 @@ _ecore_wl2_shell_bind(Ecore_Wl2_Display *ewd)
if (!global) return;
- if (!strcmp(global->interface, "zxdg_shell_v6"))
+ if (!strcmp(global->interface, "xdg_wm_base"))
+ {
+ ewd->wl.xdg_wm_base =
+ wl_registry_bind(ewd->wl.registry, global->id,
+ &xdg_wm_base_interface, 1);
+ xdg_wm_base_add_listener(ewd->wl.xdg_wm_base,
+ &_xdg_shell_listener, NULL);
+ ewd->shell_done = EINA_TRUE;
+ }
+ else if (!strcmp(global->interface, "zxdg_shell_v6"))
{
ewd->wl.zxdg_shell =
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 0648bfcb30..6ec509e9c4 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -12,6 +12,7 @@
# include "session-recovery-client-protocol.h"
+# include "xdg-shell-client-protocol.h"
# include "xdg-shell-unstable-v6-client-protocol.h"
# include "efl-aux-hints-client-protocol.h"
@@ -88,6 +89,7 @@ struct _Ecore_Wl2_Display
struct wl_shm *shm;
struct zwp_linux_dmabuf_v1 *dmabuf;
struct zxdg_shell_v6 *zxdg_shell;
+ struct xdg_wm_base *xdg_wm_base;
struct www *www;
struct zwp_e_session_recovery *session_recovery;
struct efl_aux_hints *efl_aux_hints;
@@ -181,12 +183,20 @@ struct _Ecore_Wl2_Window
void *buffer;
struct wl_callback *callback;
struct www_surface *www_surface;
+ struct xdg_surface *xdg_surface;
+ struct xdg_toplevel *xdg_toplevel;
+ struct xdg_popup *xdg_popup;
+
struct zxdg_surface_v6 *zxdg_surface;
struct zxdg_toplevel_v6 *zxdg_toplevel;
struct zxdg_popup_v6 *zxdg_popup;
Eina_Stringshare *uuid;
+ void (*xdg_configure_ack)(struct xdg_surface *surface, uint32_t serial);
+ void (*xdg_set_min_size)(struct xdg_toplevel *toplevel, int32_t w, int32_t h);
+ void (*xdg_set_max_size)(struct xdg_toplevel *toplevel, int32_t w, int32_t h);
+
void (*zxdg_configure_ack)(struct zxdg_surface_v6 *surface, uint32_t serial);
void (*zxdg_set_min_size)(struct zxdg_toplevel_v6 *toplevel, int32_t w, int32_t h);
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 231e48f6cb..a765d14f87 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -8,6 +8,15 @@
void
_ecore_wl2_window_semi_free(Ecore_Wl2_Window *window)
{
+ if (window->xdg_popup) xdg_popup_destroy(window->xdg_popup);
+ window->xdg_popup = NULL;
+
+ if (window->xdg_toplevel) xdg_toplevel_destroy(window->xdg_toplevel);
+ window->xdg_toplevel = NULL;
+
+ if (window->xdg_surface) xdg_surface_destroy(window->xdg_surface);
+ window->xdg_surface = NULL;
+
if (window->zxdg_popup) zxdg_popup_v6_destroy(window->zxdg_popup);
window->zxdg_popup = NULL;
@@ -109,8 +118,74 @@ _configure_complete(Ecore_Wl2_Window *window)
}
+#include "window_v6.x"
+
+static void
+_www_surface_end_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
+{
+ Ecore_Wl2_Window *window = data;
+ Ecore_Wl2_Event_Window_WWW_Drag *ev;
+
+ ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
+ EINA_SAFETY_ON_NULL_RETURN(ev);
+ ev->window = window->id;
+ ev->dragging = 0;
+
+ ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL);
+}
+
+static void
+_www_surface_start_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
+{
+ Ecore_Wl2_Window *window = data;
+ Ecore_Wl2_Event_Window_WWW_Drag *ev;
+
+ ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
+ EINA_SAFETY_ON_NULL_RETURN(ev);
+ ev->window = window->id;
+ ev->dragging = 1;
+
+ ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL);
+}
+
static void
-_zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA_UNUSED, uint32_t serial)
+_www_surface_status(void *data, struct www_surface *www_surface EINA_UNUSED, int32_t x_rel, int32_t y_rel, uint32_t timestamp)
+{
+ Ecore_Wl2_Window *window = data;
+ Ecore_Wl2_Event_Window_WWW *ev;
+
+ ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW));
+ EINA_SAFETY_ON_NULL_RETURN(ev);
+ ev->window = window->id;
+ ev->x_rel = x_rel;
+ ev->y_rel = y_rel;
+ ev->timestamp = timestamp;
+
+ ecore_event_add(_ecore_wl2_event_window_www, ev, NULL, NULL);
+}
+
+static struct www_surface_listener _www_surface_listener =
+{
+ .status = _www_surface_status,
+ .start_drag = _www_surface_start_drag,
+ .end_drag = _www_surface_end_drag,
+};
+
+void
+_ecore_wl2_window_www_surface_init(Ecore_Wl2_Window *window)
+{
+ if (!window->surface) return;
+ if (!window->display->wl.www) return;
+ if (window->www_surface) return;
+ window->www_surface = www_create(window->display->wl.www, window->surface);
+ www_surface_set_user_data(window->www_surface, window);
+ www_surface_add_listener(window->www_surface, &_www_surface_listener,
+ window);
+}
+
+
+static void
+_xdg_surface_cb_configure(void *data, struct xdg_surface *xdg_surface EINA_UNUSED, uint32_t serial)
{
Ecore_Wl2_Window *window;
@@ -130,13 +205,13 @@ _zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA
_ecore_wl2_window_configure_send(window);
}
-static const struct zxdg_surface_v6_listener _zxdg_surface_listener =
+static const struct xdg_surface_listener _xdg_surface_listener =
{
- _zxdg_surface_cb_configure,
+ _xdg_surface_cb_configure,
};
static void
-_zxdg_toplevel_cb_configure(void *data, struct zxdg_toplevel_v6 *zxdg_toplevel EINA_UNUSED, int32_t width, int32_t height, struct wl_array *states)
+_xdg_toplevel_cb_configure(void *data, struct xdg_toplevel *xdg_toplevel EINA_UNUSED, int32_t width, int32_t height, struct wl_array *states)
{
Ecore_Wl2_Window *win = data;
uint32_t *s;
@@ -172,7 +247,7 @@ _zxdg_toplevel_cb_configure(void *data, struct zxdg_toplevel_v6 *zxdg_toplevel E
}
static void
-_zxdg_toplevel_cb_close(void *data, struct zxdg_toplevel_v6 *zxdg_toplevel EINA_UNUSED)
+_xdg_toplevel_cb_close(void *data, struct xdg_toplevel *xdg_toplevel EINA_UNUSED)
{
Ecore_Wl2_Window *win;
@@ -182,14 +257,14 @@ _zxdg_toplevel_cb_close(void *data, struct zxdg_toplevel_v6 *zxdg_toplevel EINA_
ecore_wl2_window_free(win);
}
-static const struct zxdg_toplevel_v6_listener _zxdg_toplevel_listener =
+static const struct xdg_toplevel_listener _xdg_toplevel_listener =
{
- _zxdg_toplevel_cb_configure,
- _zxdg_toplevel_cb_close,
+ _xdg_toplevel_cb_configure,
+ _xdg_toplevel_cb_close,
};
static void
-_zxdg_popup_cb_configure(void *data, struct zxdg_popup_v6 *zxdg_popup EINA_UNUSED, int32_t x EINA_UNUSED, int32_t y EINA_UNUSED, int32_t width, int32_t height)
+_xdg_popup_cb_configure(void *data, struct xdg_popup *xdg_popup EINA_UNUSED, int32_t x EINA_UNUSED, int32_t y EINA_UNUSED, int32_t width, int32_t height)
{
Ecore_Wl2_Window *win = data;
win->def_config.geometry.w = width;
@@ -197,7 +272,7 @@ _zxdg_popup_cb_configure(void *data, struct zxdg_popup_v6 *zxdg_popup EINA_UNUSE
}
static void
-_zxdg_popup_cb_done(void *data, struct zxdg_popup_v6 *zxdg_popup EINA_UNUSED)
+_xdg_popup_cb_done(void *data, struct xdg_popup *xdg_popup EINA_UNUSED)
{
Ecore_Wl2_Window *win;
@@ -207,40 +282,39 @@ _zxdg_popup_cb_done(void *data, struct zxdg_popup_v6 *zxdg_popup EINA_UNUSED)
if (win->grab) _ecore_wl2_input_ungrab(win->grab);
}
-static const struct zxdg_popup_v6_listener _zxdg_popup_listener =
+static const struct xdg_popup_listener _xdg_popup_listener =
{
- _zxdg_popup_cb_configure,
- _zxdg_popup_cb_done,
+ _xdg_popup_cb_configure,
+ _xdg_popup_cb_done,
};
static void
-_ecore_wl2_window_zxdg_popup_create(Ecore_Wl2_Window *win)
+_ecore_wl2_window_xdg_popup_create(Ecore_Wl2_Window *win)
{
- struct zxdg_positioner_v6 *pos;
+ struct xdg_positioner *pos;
EINA_SAFETY_ON_NULL_RETURN(win->parent);
- pos = zxdg_shell_v6_create_positioner(win->display->wl.zxdg_shell);
+ pos = xdg_wm_base_create_positioner(win->display->wl.xdg_wm_base);
if (!pos) return;
- zxdg_positioner_v6_set_anchor_rect(pos, win->set_config.geometry.x,
+ xdg_positioner_set_anchor_rect(pos, win->set_config.geometry.x,
win->set_config.geometry.y,
1, 1);
- zxdg_positioner_v6_set_size(pos, win->set_config.geometry.w,
+ xdg_positioner_set_size(pos, win->set_config.geometry.w,
win->set_config.geometry.h);
- zxdg_positioner_v6_set_anchor(pos, ZXDG_POSITIONER_V6_ANCHOR_TOP |
- ZXDG_POSITIONER_V6_ANCHOR_LEFT);
- zxdg_positioner_v6_set_gravity(pos, ZXDG_POSITIONER_V6_ANCHOR_BOTTOM |
+ xdg_positioner_set_anchor(pos, XDG_POSITIONER_ANCHOR_TOP_LEFT);
+ xdg_positioner_set_gravity(pos, ZXDG_POSITIONER_V6_ANCHOR_BOTTOM |
ZXDG_POSITIONER_V6_ANCHOR_RIGHT);
- win->zxdg_popup = zxdg_surface_v6_get_popup(win->zxdg_surface,
- win->parent->zxdg_surface, pos);
+ win->xdg_popup = xdg_surface_get_popup(win->xdg_surface,
+ win->parent->xdg_surface, pos);
- zxdg_positioner_v6_destroy(pos);
+ xdg_positioner_destroy(pos);
if (win->grab)
- zxdg_popup_v6_grab(win->zxdg_popup, win->grab->wl.seat,
+ xdg_popup_grab(win->xdg_popup, win->grab->wl.seat,
wl_display_get_serial(win->display->wl.display));
- zxdg_popup_v6_set_user_data(win->zxdg_popup, win);
- zxdg_popup_v6_add_listener(win->zxdg_popup, &_zxdg_popup_listener, win);
+ xdg_popup_set_user_data(win->xdg_popup, win);
+ xdg_popup_add_listener(win->xdg_popup, &_xdg_popup_listener, win);
win->pending.configure = EINA_TRUE;
@@ -248,128 +322,70 @@ _ecore_wl2_window_zxdg_popup_create(Ecore_Wl2_Window *win)
}
static void
-_www_surface_end_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
-{
- Ecore_Wl2_Window *window = data;
- Ecore_Wl2_Event_Window_WWW_Drag *ev;
-
- ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
- EINA_SAFETY_ON_NULL_RETURN(ev);
- ev->window = window->id;
- ev->dragging = 0;
+_window_shell_surface_create(Ecore_Wl2_Window *window)
+{
+ if (window->xdg_surface) return;
+ window->xdg_surface =
+ xdg_wm_base_get_xdg_surface(window->display->wl.xdg_wm_base,
+ window->surface);
+ xdg_surface_set_user_data(window->xdg_surface, window);
+ xdg_surface_add_listener(window->xdg_surface,
+ &_xdg_surface_listener, window);
+
+ window->xdg_configure_ack = xdg_surface_ack_configure;
+ window->pending.configure = EINA_TRUE;
+ if (window->display->wl.efl_hints)
+ {
+ if (window->aspect.set)
+ efl_hints_set_aspect(window->display->wl.efl_hints, window->xdg_surface,
+ window->aspect.w, window->aspect.h, window->aspect.aspect);
+ if (window->weight.set)
+ efl_hints_set_weight(window->display->wl.efl_hints, window->xdg_surface,
+ window->weight.w, window->weight.h);
+ }
- ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL);
-}
+ if (window->type == ECORE_WL2_WINDOW_TYPE_MENU)
+ _ecore_wl2_window_xdg_popup_create(window);
+ else
+ {
+ struct xdg_toplevel *ptop = NULL;
-static void
-_www_surface_start_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
-{
- Ecore_Wl2_Window *window = data;
- Ecore_Wl2_Event_Window_WWW_Drag *ev;
+ window->xdg_toplevel =
+ xdg_surface_get_toplevel(window->xdg_surface);
+ xdg_toplevel_set_user_data(window->xdg_toplevel, window);
+ xdg_toplevel_add_listener(window->xdg_toplevel,
+ &_xdg_toplevel_listener, window);
- ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
- EINA_SAFETY_ON_NULL_RETURN(ev);
- ev->window = window->id;
- ev->dragging = 1;
+ if (window->title)
+ xdg_toplevel_set_title(window->xdg_toplevel, window->title);
+ if (window->class)
+ xdg_toplevel_set_app_id(window->xdg_toplevel, window->class);
- ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL);
-}
+ window->xdg_set_min_size = xdg_toplevel_set_min_size;
+ window->xdg_set_max_size = xdg_toplevel_set_max_size;
-static void
-_www_surface_status(void *data, struct www_surface *www_surface EINA_UNUSED, int32_t x_rel, int32_t y_rel, uint32_t timestamp)
-{
- Ecore_Wl2_Window *window = data;
- Ecore_Wl2_Event_Window_WWW *ev;
+ if (window->parent)
+ ptop = window->parent->xdg_toplevel;
- ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW));
- EINA_SAFETY_ON_NULL_RETURN(ev);
- ev->window = window->id;
- ev->x_rel = x_rel;
- ev->y_rel = y_rel;
- ev->timestamp = timestamp;
+ if (ptop)
+ xdg_toplevel_set_parent(window->xdg_toplevel, ptop);
- ecore_event_add(_ecore_wl2_event_window_www, ev, NULL, NULL);
-}
+ if (window->set_config.maximized)
+ xdg_toplevel_set_maximized(window->xdg_toplevel);
-static struct www_surface_listener _www_surface_listener =
-{
- .status = _www_surface_status,
- .start_drag = _www_surface_start_drag,
- .end_drag = _www_surface_end_drag,
-};
+ if (window->set_config.fullscreen)
+ xdg_toplevel_set_fullscreen(window->xdg_toplevel, NULL);
+ }
-void
-_ecore_wl2_window_www_surface_init(Ecore_Wl2_Window *window)
-{
- if (!window->surface) return;
- if (!window->display->wl.www) return;
- if (window->www_surface) return;
- window->www_surface = www_create(window->display->wl.www, window->surface);
- www_surface_set_user_data(window->www_surface, window);
- www_surface_add_listener(window->www_surface, &_www_surface_listener,
- window);
+ ecore_wl2_window_commit(window, EINA_TRUE);
}
void
_ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window)
{
if (!window->surface) return;
- if ((window->display->wl.zxdg_shell) && (!window->zxdg_surface))
- {
- window->zxdg_surface =
- zxdg_shell_v6_get_xdg_surface(window->display->wl.zxdg_shell,
- window->surface);
- zxdg_surface_v6_set_user_data(window->zxdg_surface, window);
- zxdg_surface_v6_add_listener(window->zxdg_surface,
- &_zxdg_surface_listener, window);
-
- window->zxdg_configure_ack = zxdg_surface_v6_ack_configure;
- window->pending.configure = EINA_TRUE;
- if (window->display->wl.efl_hints)
- {
- if (window->aspect.set)
- efl_hints_set_aspect(window->display->wl.efl_hints, window->zxdg_surface,
- window->aspect.w, window->aspect.h, window->aspect.aspect);
- if (window->weight.set)
- efl_hints_set_weight(window->display->wl.efl_hints, window->zxdg_surface,
- window->weight.w, window->weight.h);
- }
-
- if (window->type == ECORE_WL2_WINDOW_TYPE_MENU)
- _ecore_wl2_window_zxdg_popup_create(window);
- else
- {
- struct zxdg_toplevel_v6 *ptop = NULL;
-
- window->zxdg_toplevel =
- zxdg_surface_v6_get_toplevel(window->zxdg_surface);
- zxdg_toplevel_v6_set_user_data(window->zxdg_toplevel, window);
- zxdg_toplevel_v6_add_listener(window->zxdg_toplevel,
- &_zxdg_toplevel_listener, window);
-
- if (window->title)
- zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title);
- if (window->class)
- zxdg_toplevel_v6_set_app_id(window->zxdg_toplevel, window->class);
-
- window->zxdg_set_min_size = zxdg_toplevel_v6_set_min_size;
- window->zxdg_set_max_size = zxdg_toplevel_v6_set_max_size;
-
- if (window->parent)
- ptop = window->parent->zxdg_toplevel;
-
- if (ptop)
- zxdg_toplevel_v6_set_parent(window->zxdg_toplevel, ptop);
-
- if (window->set_config.maximized)
- zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel);
-
- if (window->set_config.fullscreen)
- zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL);
- }
-
- ecore_wl2_window_commit(window, EINA_TRUE);
- }
+ if (window->display->wl.xdg_wm_base) _window_shell_surface_create(window);
+ if (window->display->wl.zxdg_shell) _window_v6_shell_surface_create(window);
if (window->display->wl.session_recovery)
{
@@ -377,6 +393,12 @@ _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window)
{
zwp_e_session_recovery_set_uuid(window->display->wl.session_recovery,
window->surface, window->uuid);
+ if (window->xdg_surface)
+ xdg_surface_set_window_geometry(window->xdg_surface,
+ window->set_config.geometry.x,
+ window->set_config.geometry.y,
+ window->set_config.geometry.w,
+ window->set_config.geometry.h);
if (window->zxdg_surface)
zxdg_surface_v6_set_window_geometry(window->zxdg_surface,
window->set_config.geometry.x,
@@ -571,6 +593,9 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window)
window->req_config.serial = 0;
window->def_config.serial = 0;
window->zxdg_configure_ack = NULL;
+ window->xdg_configure_ack = NULL;
+ window->xdg_set_min_size = NULL;
+ window->xdg_set_max_size = NULL;
window->zxdg_set_min_size = NULL;
window->zxdg_set_max_size = NULL;
}
@@ -637,6 +662,9 @@ ecore_wl2_window_move(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input)
window->moving = EINA_TRUE;
+ if (window->xdg_toplevel)
+ xdg_toplevel_move(window->xdg_toplevel, input->wl.seat,
+ window->display->serial);
if (window->zxdg_toplevel)
zxdg_toplevel_v6_move(window->zxdg_toplevel, input->wl.seat,
window->display->serial);
@@ -651,6 +679,9 @@ ecore_wl2_window_resize(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input, int lo
if (!input)
input = EINA_INLIST_CONTAINER_GET(window->display->inputs, Ecore_Wl2_Input);
+ if (window->xdg_toplevel)
+ xdg_toplevel_resize(window->xdg_toplevel, input->wl.seat,
+ window->display->serial, location);
if (window->zxdg_toplevel)
zxdg_toplevel_v6_resize(window->zxdg_toplevel, input->wl.seat,
window->display->serial, location);
@@ -847,11 +878,15 @@ ecore_wl2_window_maximized_set(Ecore_Wl2_Window *window, Eina_Bool maximized)
if (!window->set_config.fullscreen)
window->saved = window->set_config.geometry;
+ if (window->xdg_toplevel)
+ xdg_toplevel_set_maximized(window->xdg_toplevel);
if (window->zxdg_toplevel)
zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel);
}
else
{
+ if (window->xdg_toplevel)
+ xdg_toplevel_unset_maximized(window->xdg_toplevel);
if (window->zxdg_toplevel)
zxdg_toplevel_v6_unset_maximized(window->zxdg_toplevel);
}
@@ -889,11 +924,15 @@ ecore_wl2_window_fullscreen_set(Ecore_Wl2_Window *window, Eina_Bool fullscreen)
if (!window->set_config.maximized)
window->saved = window->set_config.geometry;
+ if (window->xdg_toplevel)
+ xdg_toplevel_set_fullscreen(window->xdg_toplevel, NULL);
if (window->zxdg_toplevel)
zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL);
}
else
{
+ if (window->xdg_toplevel)
+ xdg_toplevel_unset_fullscreen(window->xdg_toplevel);
if (window->zxdg_toplevel)
zxdg_toplevel_v6_unset_fullscreen(window->zxdg_toplevel);
}
@@ -924,6 +963,8 @@ ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title)
eina_stringshare_replace(&window->title, title);
if (!window->title) return;
+ if (window->xdg_toplevel)
+ xdg_toplevel_set_title(window->xdg_toplevel, window->title);
if (window->zxdg_toplevel)
zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title);
}
@@ -936,6 +977,8 @@ ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas)
eina_stringshare_replace(&window->class, clas);
if (!window->class) return;
+ if (window->xdg_toplevel)
+ xdg_toplevel_set_app_id(window->xdg_toplevel, window->class);
if (window->zxdg_toplevel)
zxdg_toplevel_v6_set_app_id(window->zxdg_toplevel, window->class);
}
@@ -992,11 +1035,26 @@ ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified)
if (iconified)
{
+ if (window->xdg_toplevel)
+ xdg_toplevel_set_minimized(window->xdg_toplevel);
if (window->zxdg_toplevel)
zxdg_toplevel_v6_set_minimized(window->zxdg_toplevel);
}
else
{
+ if (window->xdg_toplevel)
+ {
+ struct wl_array states;
+ uint32_t *s;
+
+ wl_array_init(&states);
+ s = wl_array_add(&states, sizeof(*s));
+ *s = XDG_TOPLEVEL_STATE_ACTIVATED;
+ _xdg_toplevel_cb_configure(window, window->xdg_toplevel,
+ window->set_config.geometry.w,
+ window->set_config.geometry.h, &states);
+ wl_array_release(&states);
+ }
if (window->zxdg_toplevel)
{
struct wl_array states;
@@ -1044,7 +1102,7 @@ EAPI Eina_Bool
ecore_wl2_window_shell_surface_exists(Ecore_Wl2_Window *window)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE);
- return !!window->zxdg_surface;
+ return !!window->zxdg_surface || !!window->xdg_surface;
}
EAPI Eina_Bool
@@ -1352,9 +1410,9 @@ ecore_wl2_window_aspect_set(Ecore_Wl2_Window *window, int w, int h, unsigned int
window->aspect.aspect = aspect;
window->aspect.set = 1;
if (!window->display->wl.efl_hints) return;
- if (window->zxdg_surface)
+ if (window->xdg_surface)
efl_hints_set_aspect(window->display->wl.efl_hints,
- window->zxdg_surface, w, h, aspect);
+ window->xdg_surface, w, h, aspect);
}
EAPI void
@@ -1373,9 +1431,9 @@ ecore_wl2_window_weight_set(Ecore_Wl2_Window *window, double w, double h)
window->weight.h = hh;
window->weight.set = 1;
if (!window->display->wl.efl_hints) return;
- if (window->zxdg_surface)
+ if (window->xdg_surface)
efl_hints_set_weight(window->display->wl.efl_hints,
- window->zxdg_surface, ww, hh);
+ window->xdg_surface, ww, hh);
}
static void
@@ -1401,29 +1459,45 @@ static struct wl_callback_listener _frame_listener =
static void
_maximized_set(Ecore_Wl2_Window *window)
{
- EINA_SAFETY_ON_NULL_RETURN(window->zxdg_toplevel);
+ EINA_SAFETY_ON_FALSE_RETURN(window->zxdg_toplevel || window->xdg_toplevel);
if (window->set_config.maximized)
{
window->saved = window->set_config.geometry;
- zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel);
+ if (window->xdg_toplevel)
+ xdg_toplevel_set_maximized(window->xdg_toplevel);
+ if (window->zxdg_toplevel)
+ zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel);
}
else
- zxdg_toplevel_v6_unset_maximized(window->zxdg_toplevel);
+ {
+ if (window->xdg_toplevel)
+ xdg_toplevel_unset_maximized(window->xdg_toplevel);
+ if (window->zxdg_toplevel)
+ zxdg_toplevel_v6_unset_maximized(window->zxdg_toplevel);
+ }
}
static void
_fullscreen_set(Ecore_Wl2_Window *window)
{
- EINA_SAFETY_ON_NULL_RETURN(window->zxdg_toplevel);
+ EINA_SAFETY_ON_FALSE_RETURN(window->zxdg_toplevel || window->xdg_toplevel);
if (window->set_config.fullscreen)
{
window->saved = window->set_config.geometry;
- zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL);
+ if (window->xdg_toplevel)
+ xdg_toplevel_set_fullscreen(window->xdg_toplevel, NULL);
+ if (window->zxdg_toplevel)
+ zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL);
}
else
- zxdg_toplevel_v6_unset_fullscreen(window->zxdg_toplevel);
+ {
+ if (window->xdg_toplevel)
+ xdg_toplevel_unset_fullscreen(window->xdg_toplevel);
+ if (window->zxdg_toplevel)
+ zxdg_toplevel_v6_unset_fullscreen(window->zxdg_toplevel);
+ }
}
static void
@@ -1493,12 +1567,21 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush)
window->callback = wl_surface_frame(window->surface);
wl_callback_add_listener(window->callback, &_frame_listener, window);
/* Dispatch any state we've been saving along the way */
- if (window->pending.geom && window->zxdg_toplevel)
- zxdg_surface_v6_set_window_geometry(window->zxdg_surface,
- window->set_config.geometry.x,
- window->set_config.geometry.y,
- window->set_config.geometry.w,
- window->set_config.geometry.h);
+ if (window->pending.geom)
+ {
+ if (window->xdg_toplevel)
+ xdg_surface_set_window_geometry(window->xdg_surface,
+ window->set_config.geometry.x,
+ window->set_config.geometry.y,
+ window->set_config.geometry.w,
+ window->set_config.geometry.h);
+ if (window->zxdg_surface)
+ zxdg_surface_v6_set_window_geometry(window->zxdg_surface,
+ window->set_config.geometry.x,
+ window->set_config.geometry.y,
+ window->set_config.geometry.w,
+ window->set_config.geometry.h);
+ }
if (window->pending.opaque)
_opaque_set(window);
@@ -1520,6 +1603,9 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush)
if (window->req_config.serial != window->set_config.serial)
{
+ if (window->xdg_configure_ack)
+ window->xdg_configure_ack(window->xdg_surface,
+ window->req_config.serial);
if (window->zxdg_configure_ack)
window->zxdg_configure_ack(window->zxdg_surface,
window->req_config.serial);
diff --git a/src/lib/ecore_wl2/window_v6.x b/src/lib/ecore_wl2/window_v6.x
new file mode 100644
index 0000000000..34a12d692e
--- /dev/null
+++ b/src/lib/ecore_wl2/window_v6.x
@@ -0,0 +1,188 @@
+
+static void
+_zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA_UNUSED, uint32_t serial)
+{
+ Ecore_Wl2_Window *window;
+
+ window = data;
+ window->def_config.serial = serial;
+
+ if (window->pending.configure)
+ {
+ window->saved.w = window->set_config.geometry.w;
+ window->saved.h = window->set_config.geometry.h;
+ _configure_complete(window);
+ }
+ if (window->pending.configure && window->updating)
+ ERR("Window shouldn't be rendering before initial configure");
+
+ if (!window->updating)
+ _ecore_wl2_window_configure_send(window);
+}
+
+static const struct zxdg_surface_v6_listener _zxdg_surface_listener =
+{
+ _zxdg_surface_cb_configure,
+};
+
+static void
+_zxdg_toplevel_cb_configure(void *data, struct zxdg_toplevel_v6 *zxdg_toplevel EINA_UNUSED, int32_t width, int32_t height, struct wl_array *states)
+{
+ Ecore_Wl2_Window *win = data;
+ uint32_t *s;
+
+ win->def_config.minimized = EINA_FALSE;
+ win->def_config.maximized = EINA_FALSE;
+ win->def_config.fullscreen = EINA_FALSE;
+ win->def_config.focused = EINA_FALSE;
+ win->def_config.resizing = EINA_FALSE;
+ win->def_config.geometry.w = width;
+ win->def_config.geometry.h = height;
+
+ wl_array_for_each(s, states)
+ {
+ switch (*s)
+ {
+ case ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED:
+ win->def_config.maximized = EINA_TRUE;
+ break;
+ case ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN:
+ win->def_config.fullscreen = EINA_TRUE;
+ break;
+ case ZXDG_TOPLEVEL_V6_STATE_RESIZING:
+ win->def_config.resizing = EINA_TRUE;
+ break;
+ case ZXDG_TOPLEVEL_V6_STATE_ACTIVATED:
+ win->def_config.focused = EINA_TRUE;
+ win->def_config.minimized = EINA_FALSE;
+ default:
+ break;
+ }
+ }
+}
+
+static void
+_zxdg_toplevel_cb_close(void *data, struct zxdg_toplevel_v6 *zxdg_toplevel EINA_UNUSED)
+{
+ Ecore_Wl2_Window *win;
+
+ win = data;
+ if (!win) return;
+
+ ecore_wl2_window_free(win);
+}
+
+static const struct zxdg_toplevel_v6_listener _zxdg_toplevel_listener =
+{
+ _zxdg_toplevel_cb_configure,
+ _zxdg_toplevel_cb_close,
+};
+
+static void
+_zxdg_popup_cb_configure(void *data, struct zxdg_popup_v6 *zxdg_popup EINA_UNUSED, int32_t x EINA_UNUSED, int32_t y EINA_UNUSED, int32_t width, int32_t height)
+{
+ Ecore_Wl2_Window *win = data;
+ win->def_config.geometry.w = width;
+ win->def_config.geometry.h = height;
+}
+
+static void
+_zxdg_popup_cb_done(void *data, struct zxdg_popup_v6 *zxdg_popup EINA_UNUSED)
+{
+ Ecore_Wl2_Window *win;
+
+ win = data;
+ if (!win) return;
+
+ if (win->grab) _ecore_wl2_input_ungrab(win->grab);
+}
+
+static const struct zxdg_popup_v6_listener _zxdg_popup_listener =
+{
+ _zxdg_popup_cb_configure,
+ _zxdg_popup_cb_done,
+};
+
+static void
+_window_v6_popup_create(Ecore_Wl2_Window *win)
+{
+ struct zxdg_positioner_v6 *pos;
+
+ EINA_SAFETY_ON_NULL_RETURN(win->parent);
+ pos = zxdg_shell_v6_create_positioner(win->display->wl.zxdg_shell);
+ if (!pos) return;
+
+ zxdg_positioner_v6_set_anchor_rect(pos, win->set_config.geometry.x,
+ win->set_config.geometry.y,
+ 1, 1);
+ zxdg_positioner_v6_set_size(pos, win->set_config.geometry.w,
+ win->set_config.geometry.h);
+ zxdg_positioner_v6_set_anchor(pos, ZXDG_POSITIONER_V6_ANCHOR_TOP |
+ ZXDG_POSITIONER_V6_ANCHOR_LEFT);
+ zxdg_positioner_v6_set_gravity(pos, ZXDG_POSITIONER_V6_ANCHOR_BOTTOM |
+ ZXDG_POSITIONER_V6_ANCHOR_RIGHT);
+
+ win->zxdg_popup = zxdg_surface_v6_get_popup(win->zxdg_surface,
+ win->parent->zxdg_surface, pos);
+
+ zxdg_positioner_v6_destroy(pos);
+ if (win->grab)
+ zxdg_popup_v6_grab(win->zxdg_popup, win->grab->wl.seat,
+ wl_display_get_serial(win->display->wl.display));
+ zxdg_popup_v6_set_user_data(win->zxdg_popup, win);
+ zxdg_popup_v6_add_listener(win->zxdg_popup, &_zxdg_popup_listener, win);
+
+ win->pending.configure = EINA_TRUE;
+
+ ecore_wl2_window_commit(win, EINA_TRUE);
+}
+
+static void
+_window_v6_shell_surface_create(Ecore_Wl2_Window *window)
+{
+ if (window->zxdg_surface) return;
+ window->zxdg_surface =
+ zxdg_shell_v6_get_xdg_surface(window->display->wl.zxdg_shell,
+ window->surface);
+ zxdg_surface_v6_set_user_data(window->zxdg_surface, window);
+ zxdg_surface_v6_add_listener(window->zxdg_surface,
+ &_zxdg_surface_listener, window);
+
+ window->zxdg_configure_ack = zxdg_surface_v6_ack_configure;
+ window->pending.configure = EINA_TRUE;
+
+ if (window->type == ECORE_WL2_WINDOW_TYPE_MENU)
+ _window_v6_popup_create(window);
+ else
+ {
+ struct zxdg_toplevel_v6 *ptop = NULL;
+
+ window->zxdg_toplevel =
+ zxdg_surface_v6_get_toplevel(window->zxdg_surface);
+ zxdg_toplevel_v6_set_user_data(window->zxdg_toplevel, window);
+ zxdg_toplevel_v6_add_listener(window->zxdg_toplevel,
+ &_zxdg_toplevel_listener, window);
+
+ if (window->title)
+ zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title);
+ if (window->class)
+ zxdg_toplevel_v6_set_app_id(window->zxdg_toplevel, window->class);
+
+ window->zxdg_set_min_size = zxdg_toplevel_v6_set_min_size;
+ window->zxdg_set_max_size = zxdg_toplevel_v6_set_max_size;
+
+ if (window->parent)
+ ptop = window->parent->zxdg_toplevel;
+
+ if (ptop)
+ zxdg_toplevel_v6_set_parent(window->zxdg_toplevel, ptop);
+
+ if (window->set_config.maximized)
+ zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel);
+
+ if (window->set_config.fullscreen)
+ zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL);
+ }
+
+ ecore_wl2_window_commit(window, EINA_TRUE);
+}
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index d78994423c..c3580bcbb6 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -4176,7 +4176,10 @@ _elm_win_frame_cb_menu(void *data,
EINA_ITERATOR_FOREACH(it, input) break;
eina_iterator_free(it);
}
- if (sd->wl.win->zxdg_toplevel)
+ if (sd->wl.win->xdg_toplevel)
+ xdg_toplevel_show_window_menu(sd->wl.win->xdg_toplevel,
+ ecore_wl2_input_seat_get(input), 0, x, y);
+ else if (sd->wl.win->zxdg_toplevel)
zxdg_toplevel_v6_show_window_menu(sd->wl.win->zxdg_toplevel,
ecore_wl2_input_seat_get(input), 0, x, y);
#else
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 54daeb3259..4593ae8655 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -241,6 +241,17 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
ee->w = w;
ee->h = h;
+ if (wdata->win->xdg_set_min_size && wdata->win->xdg_toplevel && wdata->win->pending.min)
+ {
+ wdata->win->xdg_set_min_size(wdata->win->xdg_toplevel, ee->prop.min.w, ee->prop.min.h);
+ wdata->win->pending.min = 0;
+ }
+ if (wdata->win->xdg_set_max_size && wdata->win->xdg_toplevel && wdata->win->pending.max)
+ {
+ wdata->win->xdg_set_max_size(wdata->win->xdg_toplevel, ee->prop.max.w, ee->prop.max.h);
+ wdata->win->pending.max = 0;
+ }
+
if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel && wdata->win->pending.min)
{
wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, ee->prop.min.w, ee->prop.min.h);
@@ -524,6 +535,9 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
wdata->win->req_config.serial && wdata->win->surface &&
((!state_change) || ((pfw == fw) && (pfh == fh))))
{
+ if (wdata->win->xdg_configure_ack)
+ wdata->win->xdg_configure_ack(wdata->win->xdg_surface,
+ wdata->win->req_config.serial);
if (wdata->win->zxdg_configure_ack)
wdata->win->zxdg_configure_ack(wdata->win->zxdg_surface,
wdata->win->req_config.serial);
@@ -1558,6 +1572,11 @@ _ecore_evas_wl_common_size_min_set(Ecore_Evas *ee, int w, int h)
ee->prop.min.w = w;
ee->prop.min.h = h;
wdata = ee->engine.data;
+ if (wdata->win->xdg_set_min_size && wdata->win->xdg_toplevel)
+ {
+ wdata->win->xdg_set_min_size(wdata->win->xdg_toplevel, w, h);
+ wdata->win->pending.min = 0;
+ }
if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel)
{
wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, w, h);
@@ -1581,6 +1600,11 @@ _ecore_evas_wl_common_size_max_set(Ecore_Evas *ee, int w, int h)
ee->prop.max.w = w;
ee->prop.max.h = h;
wdata = ee->engine.data;
+ if (wdata->win->xdg_set_max_size && wdata->win->xdg_toplevel)
+ {
+ wdata->win->xdg_set_max_size(wdata->win->xdg_toplevel, w, h);
+ wdata->win->pending.max = 0;
+ }
if (wdata->win->zxdg_set_max_size && wdata->win->zxdg_toplevel)
{
wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel, w, h);
@@ -2067,6 +2091,16 @@ _ecore_evas_wl_common_show(Ecore_Evas *ee)
{
int fw, fh;
+ if (wdata->win->xdg_set_min_size && wdata->win->xdg_toplevel && wdata->win->pending.min)
+ {
+ wdata->win->xdg_set_min_size(wdata->win->xdg_toplevel, ee->prop.min.w, ee->prop.min.h);
+ wdata->win->pending.min = 0;
+ }
+ if (wdata->win->xdg_set_max_size && wdata->win->xdg_toplevel && wdata->win->pending.max)
+ {
+ wdata->win->xdg_set_max_size(wdata->win->xdg_toplevel, ee->prop.max.w, ee->prop.max.h);
+ wdata->win->pending.max = 0;
+ }
if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel && wdata->win->pending.min)
{
wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, ee->prop.min.w, ee->prop.min.h);
diff --git a/src/wayland_protocol/efl-hints.xml b/src/wayland_protocol/efl-hints.xml
index 9f2b775dda..a29787e25f 100644
--- a/src/wayland_protocol/efl-hints.xml
+++ b/src/wayland_protocol/efl-hints.xml
@@ -9,13 +9,13 @@
<entry name="both" value="4"/>
</enum>
<request name="set_aspect">
- <arg name="surface" type="object" interface="zxdg_surface_v6"/>
+ <arg name="surface" type="object" interface="xdg_surface"/>
<arg name="width" type="uint"/>
<arg name="height" type="uint"/>
<arg name="aspect" type="uint" enum="aspect"/>
</request>
<request name="set_weight">
- <arg name="surface" type="object" interface="zxdg_surface_v6"/>
+ <arg name="surface" type="object" interface="xdg_surface"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
</request>