fix viewport on wayland

This commit is contained in:
IoIxD 2026-04-26 12:44:04 -07:00
commit 8ad9e19de0
2 changed files with 3 additions and 7 deletions

View file

@ -31,13 +31,10 @@ int main() {
if(px == NULL) px = MwLoadImage(vp, "picture.png");
// MwVaCreateWidget(MwImageClass, "image", MwViewportGetViewport(vp), 0, 0, 1024, 1024,
// MwNpixmap, px,
// NULL);
MwVaCreateWidget(MwImageClass, "image", MwViewportGetViewport(vp), 0, 0, 1024, 1024,
MwNpixmap, px,
NULL);
MwViewportSetSize(vp, 1024, 1024);
MwWidget f = MwCreateWidget(MwFrameClass, "fr", MwViewportGetViewport(vp), 256, 256, 128, 128);
f = MwCreateWidget(MwFrameClass, "fr", f, 0, 0, 128, 128);
MwCreateWidget(MwButtonClass, "btn", f, 64, 64, 128, 128);
MwAddUserHandler(w, MwNresizeHandler, resize, NULL);