From: Doyoun Kang Date: Thu, 21 Apr 2022 23:49:46 +0000 (+0900) Subject: ecore_wl2_window: modify configure event's size X-Git-Tag: accepted/tizen/unified/20220428.162702~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F27%2F274127%2F3;p=platform%2Fupstream%2Fefl.git ecore_wl2_window: modify configure event's size There was an ambiguous configure event's size. So we modified the code to determine the size of the configure event for each case. @tizen_only Change-Id: I13001bedf9a1035b5f8023d97a76a39b6d05370e --- diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 2770c09..d5e932e 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -160,6 +160,39 @@ _ecore_wl2_window_configure_send(Ecore_Wl2_Window *win) ev->y = win->set_config.geometry.y; // +// TIZEN_ONLY(220421): modify event size + if (win->def_config.fullscreen || win->def_config.maximized) + { + ev->w = win->def_config.geometry.w; + ev->h = win->def_config.geometry.h; + } + else + { + if ((win->def_config.fullscreen != win->req_config.fullscreen) || + (win->def_config.maximized != win->req_config.maximized)) + { + // this means that window unset fullscreen or maximized. + // use saved geometry + ev->w = win->saved.w; + ev->h = win->saved.h; + } + else + { + if (win->def_config.geometry.w || win->def_config.geometry.h) + { + ev->w = win->def_config.geometry.w; + ev->h = win->def_config.geometry.h; + } + else + { + // this means that display server didn't consider client's size. + // use client set_config size + ev->w = win->set_config.geometry.w; + ev->h = win->set_config.geometry.h; + } + } + } +/* if ((win->set_config.geometry.w == win->def_config.geometry.w) && (win->set_config.geometry.h == win->def_config.geometry.h)) ev->w = ev->h = 0; @@ -171,6 +204,8 @@ _ecore_wl2_window_configure_send(Ecore_Wl2_Window *win) ev->w = win->saved.w, ev->h = win->saved.h; else ev->w = win->def_config.geometry.w, ev->h = win->def_config.geometry.h; +*/ +// ev->edges = !!win->def_config.resizing; if (win->def_config.fullscreen) @@ -3669,9 +3704,12 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush) zxdg_surface_v6_set_window_geometry(window->zxdg_surface, gx, gy, gw, gh); - // TIZEN_ONLY(20210203) : update window's saved size - window->saved.w = window->set_config.geometry.w; - window->saved.h = window->set_config.geometry.h; + // TIZEN_ONLY(20220421) : update window's saved size only un-fullscreen and unmaximize state + if (!window->set_config.fullscreen && !window->set_config.maximized) + { + window->saved.w = window->set_config.geometry.w; + window->saved.h = window->set_config.geometry.h; + } // } if (window->pending.opaque || window->pending.input)