From 4c48582b983bf5ce373d8067484c13f6bda079c3 Mon Sep 17 00:00:00 2001 From: MinJeong Kim Date: Wed, 23 Mar 2016 16:11:07 +0900 Subject: [PATCH] ecore-wayland: fixed possible wrong resize with old size Change-Id: I5287ce740bb9afd0527da9356e989cdfe48a5b04 --- src/lib/ecore_wayland/ecore_wl_private.h | 6 ++++++ src/lib/ecore_wayland/ecore_wl_window.c | 20 +++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wayland/ecore_wl_private.h b/src/lib/ecore_wayland/ecore_wl_private.h index c681831..938c2d5 100644 --- a/src/lib/ecore_wayland/ecore_wl_private.h +++ b/src/lib/ecore_wayland/ecore_wl_private.h @@ -183,6 +183,12 @@ struct _Ecore_Wl_Window struct { + int w, h; + unsigned int edges; + } configured; + + struct + { int x, y, w, h; Ecore_Wl_Indicator_State state; Ecore_Wl_Indicator_Opacity_Mode mode; diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index 5a59900..5af78fe 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c @@ -345,6 +345,9 @@ ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, int w, int h, int buf win->allocation.h = h; win->saved.w = w; win->saved.h = h; + win->configured.w = w; + win->configured.h = h; + win->configured.edges = 0; win->transparent = EINA_FALSE; if (parent) win->type = ECORE_WL_WINDOW_TYPE_TRANSIENT; @@ -821,6 +824,9 @@ ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h) if (!win) return; win->allocation.w = w; win->allocation.h = h; + win->configured.w = w; + win->configured.h = h; + win->configured.edges = 0; if ((!ecore_wl_window_maximized_get(win)) && (!win->fullscreen)) { win->saved.w = w; @@ -1439,6 +1445,10 @@ _ecore_wl_window_cb_configure(void *data, struct wl_shell_surface *shell_surface if ((win->allocation.w != w) || (win->allocation.h != h)) { + win->configured.w = w; + win->configured.h = h; + win->configured.edges = edges; + _ecore_wl_window_configure_send(win, w, h, edges); } @@ -1501,9 +1511,9 @@ _ecore_wl_window_cb_position_change(void *data, struct tizen_position *tizen_pos { ecore_wl_window_update_location(win, x, y); _ecore_wl_window_configure_send(win, - win->allocation.w, - win->allocation.h, - 0); + win->configured.w, + win->configured.h, + win->configured.edges); } } @@ -1734,6 +1744,10 @@ _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h, int edges) ev->h = h; ev->edges = edges; + win->configured.w = w; + win->configured.h = h; + win->configured.edges = edges; + ecore_event_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, ev, NULL, NULL); } -- 2.7.4