summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-03-10 15:54:34 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-03-10 15:54:21 -0500
commit1b9970658f17d6b130a24cf9a960e1a43b696160 (patch)
tree2878d5b28ff467820d130be185f0c281b10d7c71
parent53c9a06c2dd2761bfc416a5986252c2fb4c06136 (diff)
ecore-evas-wayland: commit on no-op configure events
this handles the case of a window configure not triggering any visible change fix T5192
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c17
1 files changed, 12 insertions, 5 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 fc1d0d4cc7..5c4b04389b 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
@@ -279,8 +279,8 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
279 Ecore_Evas *ee; 279 Ecore_Evas *ee;
280 Ecore_Evas_Engine_Wl_Data *wdata; 280 Ecore_Evas_Engine_Wl_Data *wdata;
281 Ecore_Wl2_Event_Window_Configure *ev; 281 Ecore_Wl2_Event_Window_Configure *ev;
282 int nw = 0, nh = 0, fw, fh; 282 int nw = 0, nh = 0, fw, fh, pfw, pfh;
283 Eina_Bool prev_max, prev_full; 283 Eina_Bool prev_max, prev_full, state_change = EINA_FALSE;
284 284
285 LOGFN(__FILE__, __LINE__, __FUNCTION__); 285 LOGFN(__FILE__, __LINE__, __FUNCTION__);
286 286
@@ -302,18 +302,25 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
302 nw = ev->w; 302 nw = ev->w;
303 nh = ev->h; 303 nh = ev->h;
304 304
305 fw = wdata->win->geometry.w - wdata->content.w; 305 pfw = fw = wdata->win->geometry.w - wdata->content.w;
306 fh = wdata->win->geometry.h - wdata->content.h; 306 pfh = fh = wdata->win->geometry.h - wdata->content.h;
307 307
308 if ((prev_max != ee->prop.maximized) || 308 if ((prev_max != ee->prop.maximized) ||
309 (prev_full != ee->prop.fullscreen)) 309 (prev_full != ee->prop.fullscreen))
310 { 310 {
311 state_change = EINA_TRUE;
311 _ecore_evas_wl_common_state_update(ee); 312 _ecore_evas_wl_common_state_update(ee);
312 fw = wdata->win->geometry.w - wdata->content.w; 313 fw = wdata->win->geometry.w - wdata->content.w;
313 fh = wdata->win->geometry.h - wdata->content.h; 314 fh = wdata->win->geometry.h - wdata->content.h;
314 } 315 }
315 316
316 if ((!nw) && (!nh)) return ECORE_CALLBACK_RENEW; 317 if ((!nw) && (!nh))
318 {
319 /* this assumes ecore-wl2 continues to immediately ack every configure */
320 if (wdata->win->surface && ((!state_change) || ((pfw == fw) && (pfh == fh))))
321 wl_surface_commit(wdata->win->surface);
322 return ECORE_CALLBACK_RENEW;
323 }
317 324
318 nw -= fw; 325 nw -= fw;
319 nh -= fh; 326 nh -= fh;