ecore_wl2_window: check current geometry in window_sync_geometry_set function 33/287733/2 accepted/tizen/unified/20230215.100741
authorDoyoun Kang <doyoun.kang@samsung.com>
Fri, 3 Feb 2023 07:33:03 +0000 (16:33 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Fri, 3 Feb 2023 07:54:06 +0000 (16:54 +0900)
There was a bug that the pending.user_resize value was not unset if the new geometry was same
to current geometry in ecore_wl2_window_sync_geometry_set().
This was becuase that the display server didn't send the configure event if the window geometry
was not changed.

So, we changed code that the ecore_wl2_window_sync_geometry_set() function just returns if
the new geometry is same to previous geometry.

@tizen_only

Change-Id: Idff1ba819f45a83cfdd6ff5dbab03d51334379bf

src/lib/ecore_wl2/ecore_wl2_window.c

index 90eb4de..56debdf 100644 (file)
@@ -4434,16 +4434,17 @@ ecore_wl2_window_sync_geometry_set(Ecore_Wl2_Window *window, uint32_t serial, in
 {
    if (!window) return;
 
-   if ((window->set_config.geometry.x != x) ||
-       (window->set_config.geometry.y != y) ||
-       (window->set_config.geometry.w != w) ||
-       (window->set_config.geometry.h != h))
-     window->pending.geom = EINA_TRUE;
+   if ((window->set_config.geometry.x == x) &&
+       (window->set_config.geometry.y == y) &&
+       (window->set_config.geometry.w == w) &&
+       (window->set_config.geometry.h == h))
+     return;
 
    window->set_config.geometry.x = x;
    window->set_config.geometry.y = y;
    window->set_config.geometry.w = w;
    window->set_config.geometry.h = h;
+   window->pending.geom = EINA_TRUE;
 
    window->pending.user_resize = EINA_TRUE;
    window->pending.user_w = w;