wayland: have MwLLEndStateChange use the right x/y when not detaching

This commit is contained in:
IoIxD 2026-07-09 16:00:39 -07:00
commit 14d010f9a2

View file

@ -1805,8 +1805,12 @@ static void MwLLBeginStateChangeImpl(MwLL handle) {
static void MwLLEndStateChangeImpl(MwLL handle) {
MwLL topmost_parent;
int x, y;
WIDGET_CHECK(handle);
x = handle->wayland.detatching ? handle->wayland.detach_point.x : handle->wayland.x;
y = handle->wayland.detatching ? handle->wayland.detach_point.y : handle->wayland.y;
topmost_parent = handle->wayland.parent;
while(topmost_parent) {
@ -1842,7 +1846,7 @@ static void MwLLEndStateChangeImpl(MwLL handle) {
MwLLWaylandFlush(handle);
widget_setup(handle, handle->wayland.parent, handle->wayland.detach_point.x, handle->wayland.detach_point.y, handle->wayland.ww, handle->wayland.wh, handle->wayland.type_to_be);
widget_setup(handle, handle->wayland.parent, x, y, handle->wayland.ww, handle->wayland.wh, handle->wayland.type_to_be);
handle->wayland.is_toplevel = MwTRUE;