e_comp_wl/e_xdg_shell: modify code for handling configure event size 44/291644/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 19 Apr 2023 00:24:29 +0000 (09:24 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 19 Apr 2023 23:36:54 +0000 (08:36 +0900)
We modify code to call configure_send function with width and height are -1 when only
the window's state is changed.
If the width and height are -1, this means we don't need to consider the size value
while sending configure event.

So, in this case, we don't update the configure size value.

Change-Id: I5d75520c915acc5b558d63524b638761f2242626

src/bin/e_comp_wl.c
src/bin/e_xdg_shell_v6.c

index ca08c8e..ac48cbc 100644 (file)
@@ -223,7 +223,10 @@ _e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
           w = ec->w, h = ec->h;
      }
    else
-     w = h = 0;
+     {
+        // Width and Height are -1 means that we don't consider size value
+        w = h = -1;
+     }
 
    ec->comp_data->shell.configure_send(ec->comp_data->shell.surface,
                                        edges * e_comp_wl->resize.edges,
index 9f300ec..70c7526 100644 (file)
@@ -460,6 +460,11 @@ _e_xdg_toplevel_configure_send(E_Xdg_Toplevel *toplevel,
                                    &states);
 
    wl_array_release(&states);
+
+   // clear toplevel's pending size
+   toplevel->pending.size.w = 0;
+   toplevel->pending.size.h = 0;
+
    return;
 
 err:
@@ -482,8 +487,15 @@ _e_xdg_toplevel_configure_pending_set(E_Xdg_Toplevel *toplevel,
    toplevel->pending.state.maximized = !!ec->maximized;
    toplevel->pending.state.resizing = !!edges;
    toplevel->pending.edges = edges;
-   toplevel->pending.size.w = width;
-   toplevel->pending.size.h = height;
+   if ((width != -1) && (height != -1))
+     {
+        /* NOTE:
+         * Width and Height are -1 means that the configure event doesn't consider size value.
+         * So, we update pending size if the size are not -1.
+         */
+        toplevel->pending.size.w = width;
+        toplevel->pending.size.h = height;
+     }
 
    if ((toplevel->pending.state.maximized) ||
        (toplevel->pending.state.fullscreen))