Page MenuHomePhabricator

wayland engine calculates configure sizes inaccurately
Closed, ResolvedPublic

Description

From ecore_evas_wayland_common.c

/* NB: We receive window configure sizes based on xdg surface
 * window geometry, so we need to subtract framespace here */
evas_output_framespace_get(ee->evas, NULL, &fy, NULL, NULL);
nh = (ev->h - fy);

This is wrong. The framespace is the entire CSD region and is unrelated to window geometry height nh.

The calculation should be something like nh -= frame_h to subtract the total height of the frame. Furthermore, the width of the frame also needs to be subtracted here to account for more complex frame designs.

I don't have any good ideas for implementing this since there's no mechanism for tracking "window size" in evas; the best I could come up with is sticking something onto the wl2 window data from elm now that the tree has merged, but this is an awkward fix for the issue.

zmike created this task.Mar 30 2016, 12:57 PM

In actuality, "framespace" is NOT the CSD region. "Framespace" is the area around the window not occupied by the frame (ie: the shadow area). Assuming you have a "framespace" of x = 5 y = 5 then that means the frame corner starts drawing at 5,5

zmike added a comment.Mar 31 2016, 6:46 AM

In actuality, "framespace" is NOT the CSD region. "Framespace" is the area around the window not occupied by the frame (ie: the shadow area). Assuming you have a "framespace" of x = 5 y = 5 then that means the frame corner starts drawing at 5,5

So then I guess we've coincidentally been using it wrong in every single case? Because it's definitely the full CSD region.

Well, perhaps it's meaning and usage has changed since it was written...it has been a while since I've read that code