From bc900b0ea0b5649c25ca6a0b2f4d4860d1ea9c32 Mon Sep 17 00:00:00 2001 From: MinJeong Kim Date: Thu, 19 Nov 2015 15:10:51 +0900 Subject: [PATCH] wl_desktop_shell: send size of maximized/fullscreen client Previous resize routine without this patch had caused two-step resize problem of comp object. To prevent those rough resizing, we sends configure event of xdg_surface with size of maximized or fullscreen client. Change-Id: I4fcc139d82d03c25630b462f5b838f971bd0835d --- src/modules/wl_desktop_shell/e_mod_main.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index d785035..099d6e6 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -669,9 +669,27 @@ _e_xdg_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges wl_array_init(&states); if (ec->fullscreen) - _e_xdg_surface_state_add(resource, &states, XDG_SURFACE_STATE_FULLSCREEN); + { + _e_xdg_surface_state_add(resource, &states, XDG_SURFACE_STATE_FULLSCREEN); + + //send fullscreen size + if ((width == 0) && (height == 0)) + { + width = ec->client.w && ec->client.h? ec->client.w : ec->w; + height = ec->client.w && ec->client.h? ec->client.h : ec->h; + } + } else if (ec->maximized) - _e_xdg_surface_state_add(resource, &states, XDG_SURFACE_STATE_MAXIMIZED); + { + _e_xdg_surface_state_add(resource, &states, XDG_SURFACE_STATE_MAXIMIZED); + + //send maximized size + if ((width == 0) && (height == 0)) + { + width = ec->client.w && ec->client.h? ec->client.w : ec->w; + height = ec->client.w && ec->client.h? ec->client.h : ec->h; + } + } if (edges != 0) _e_xdg_surface_state_add(resource, &states, XDG_SURFACE_STATE_RESIZING); if (ec->focused) -- 2.7.4