summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-11-17 13:51:19 -0500
committerChris Michael <cp.michael@samsung.com>2015-11-17 13:51:19 -0500
commitd34ad18f3081dc4f887dd869639fd3e72d3bbc11 (patch)
tree8ed0741ae92ca1e9fe38fd85358b8f700410395c
parente04146f7dec24fa1769519b57fc996a1ddd33af5 (diff)
ecore-evas-wl: Fix issue of improper window geometry
This fixes an issue where maximizing a window would set improper xdg surface window geometry. We receive window configure sizes based on xdg surface window geometry, so we need to subtract framespace there or else window size grows when maximizing/unmaximizing multiple times. This also adjusts the call to xdg_surface_set_window_geometry to account for framespace (Fixes T2842). @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index ef0e7e17a7..5027cce408 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -168,6 +168,7 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
168 Ecore_Evas_Engine_Wl_Data *wdata; 168 Ecore_Evas_Engine_Wl_Data *wdata;
169 Ecore_Wl_Event_Window_Configure *ev; 169 Ecore_Wl_Event_Window_Configure *ev;
170 int nw = 0, nh = 0; 170 int nw = 0, nh = 0;
171 int fw = 0, fh = 0;
171 Eina_Bool prev_max, prev_full; 172 Eina_Bool prev_max, prev_full;
172 173
173 LOGFN(__FILE__, __LINE__, __FUNCTION__); 174 LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -190,6 +191,18 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
190 if (nw < 1) nw = 1; 191 if (nw < 1) nw = 1;
191 if (nh < 1) nh = 1; 192 if (nh < 1) nh = 1;
192 193
194 evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
195 if (ECORE_EVAS_PORTRAIT(ee))
196 {
197 nw -= fw;
198 nh -= fh;
199 }
200 else
201 {
202 nw -= fh;
203 nh -= fw;
204 }
205
193 if (prev_full != ee->prop.fullscreen) 206 if (prev_full != ee->prop.fullscreen)
194 _ecore_evas_wl_common_border_update(ee); 207 _ecore_evas_wl_common_border_update(ee);
195 208
@@ -636,8 +649,9 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
636 649
637 if (ee->func.fn_resize) ee->func.fn_resize(ee); 650 if (ee->func.fn_resize) ee->func.fn_resize(ee);
638 } 651 }
652
639 if (wdata->win) 653 if (wdata->win)
640 ecore_wl_window_update_size(wdata->win, ee->req.w, ee->req.h); 654 ecore_wl_window_update_size(wdata->win, w, h);
641} 655}
642 656
643void 657void