fix popup positions
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoIxD 2026-09-26 17:24:56 -07:00
commit 647b86fd7d
3 changed files with 10 additions and 4 deletions

View file

@ -158,6 +158,7 @@ struct _MwWidget {
long last_tick;
MwBool is_menu;
MwBool is_submenu;
};
#endif

View file

@ -549,9 +549,13 @@ static void setup_popup(MwLL r, int x, int y, MwLL parent) {
}
if(!topmost_parent->wayland.has_decorations && topmost_parent->wayland.do_csd) {
if(p->is_menu) {
r->wayland.x += round((float)CSD_BORDER_FRAME_LEFT / 2.);
r->wayland.y += ceil((float)CSD_BORDER_FRAME_TOP / 2.);
if(p->is_submenu) {
} else if(p->is_menu) {
r->wayland.x += ((float)CSD_BORDER_FRAME_LEFT / 2.);
r->wayland.y += ((float)CSD_BORDER_FRAME_TOP / 2.);
} else {
r->wayland.x += ((float)CSD_BORDER_FRAME_LEFT);
r->wayland.y += ((float)CSD_BORDER_FRAME_TOP);
}
}
}

View file

@ -9,6 +9,7 @@ static int wcreate(MwWidget handle) {
MwSetInteger(handle, MwNleftPadding, 0);
handle->internal = NULL;
handle->is_submenu = MwTRUE;
return 0;
}