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);

View file

@ -2516,7 +2516,6 @@ static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) {
static void MwLLForceRenderImpl(MwLL handle) {
WIDGET_CHECK(handle);
if(handle->wayland.force_render) return;
wl_surface_damage(handle->wayland.framebuffer.surface, 0, 0, handle->wayland.ww, handle->wayland.wh);
handle->wayland.force_render = MwTRUE;