wl_desktop_shell: send size of maximized/fullscreen client 05/52105/2
authorMinJeong Kim <minjjj.kim@samsung.com>
Thu, 19 Nov 2015 06:10:51 +0000 (15:10 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 24 Nov 2015 07:36:17 +0000 (23:36 -0800)
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

index d785035..099d6e6 100644 (file)
@@ -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)