/* 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.