summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-02-08 14:36:16 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-04-20 13:00:27 -0500
commit541ab76e45f30e6849b14742ac87feb5479064f6 (patch)
treed95eef9a7a710227b27dceca4bc50fa28994ba4a /src
parent8b5b9989af6216dc02fa3926dbfb072205c20f1c (diff)
ecore_evas_wayland: Calculate content size from shadow and framespace
Instead of using wdata->content, calculate these values.
Diffstat (limited to 'src')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c22
1 files changed, 16 insertions, 6 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 bf998f0b0f..320b194a6e 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
@@ -489,7 +489,8 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
489 Ecore_Evas *ee; 489 Ecore_Evas *ee;
490 Ecore_Evas_Engine_Wl_Data *wdata; 490 Ecore_Evas_Engine_Wl_Data *wdata;
491 Ecore_Wl2_Event_Window_Configure *ev; 491 Ecore_Wl2_Event_Window_Configure *ev;
492 int nw = 0, nh = 0, fw, fh, pfw, pfh; 492 int nw = 0, nh = 0, fw, fh, pfw, pfh, sw, sh, contentw, contenth;
493 int framew, frameh;
493 Eina_Bool active, prev_max, prev_full, state_change = EINA_FALSE; 494 Eina_Bool active, prev_max, prev_full, state_change = EINA_FALSE;
494 495
495 LOGFN(__FILE__, __LINE__, __FUNCTION__); 496 LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -517,8 +518,13 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
517 nw = ev->w; 518 nw = ev->w;
518 nh = ev->h; 519 nh = ev->h;
519 520
520 pfw = fw = wdata->content.w ? wdata->win->set_config.geometry.w - wdata->content.w : 0; 521 sw = ee->shadow.l + ee->shadow.r;
521 pfh = fh = wdata->content.h ? wdata->win->set_config.geometry.h - wdata->content.h : 0; 522 sh = ee->shadow.t + ee->shadow.b;
523 evas_output_framespace_get(ee->evas, NULL, NULL, &framew, &frameh);
524 contentw = wdata->win->set_config.geometry.w - (framew - sw);
525 contenth = wdata->win->set_config.geometry.h - (frameh - sh);
526 pfw = fw = wdata->win->set_config.geometry.w - contentw;
527 pfh = fh = wdata->win->set_config.geometry.h - contenth;
522 528
523 if ((prev_max != ee->prop.maximized) || 529 if ((prev_max != ee->prop.maximized) ||
524 (prev_full != ee->prop.fullscreen) || 530 (prev_full != ee->prop.fullscreen) ||
@@ -526,10 +532,14 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
526 { 532 {
527 state_change = EINA_TRUE; 533 state_change = EINA_TRUE;
528 _ecore_evas_wl_common_state_update(ee); 534 _ecore_evas_wl_common_state_update(ee);
529 fw = wdata->content.w ? wdata->win->set_config.geometry.w - wdata->content.w : 0; 535 sw = ee->shadow.l + ee->shadow.r;
530 fh = wdata->content.h ? wdata->win->set_config.geometry.h - wdata->content.h : 0; 536 sh = ee->shadow.t + ee->shadow.b;
537 evas_output_framespace_get(ee->evas, NULL, NULL, &framew, &frameh);
538 contentw = wdata->win->set_config.geometry.w - (framew - sw);
539 contenth = wdata->win->set_config.geometry.h - (frameh - sh);
540 fw = wdata->win->set_config.geometry.w - contentw;
541 fh = wdata->win->set_config.geometry.h - contenth;
531 } 542 }
532
533 if ((!nw) && (!nh)) 543 if ((!nw) && (!nh))
534 { 544 {
535 if ((wdata->win->set_config.serial != wdata->win->req_config.serial) && 545 if ((wdata->win->set_config.serial != wdata->win->req_config.serial) &&