diff --git a/examples/basic/viewport.c b/examples/basic/viewport.c index 724dba59f..95718915e 100644 --- a/examples/basic/viewport.c +++ b/examples/basic/viewport.c @@ -35,7 +35,7 @@ int main() { // MwNpixmap, px, // NULL); MwViewportSetSize(vp, 1024, 1024); - MwCreateWidget(MwButtonClass, "btn", MwViewportGetViewport(vp), 256, 256, 128, 128); + MwCreateWidget(MwButtonClass, "btn", MwViewportGetViewport(vp), -64, 256, 128, 128); MwAddUserHandler(w, MwNresizeHandler, resize, NULL); diff --git a/src/backend/wayland.c b/src/backend/wayland.c index f186cb788..f5dfb1910 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -1747,6 +1747,8 @@ static void clip(MwLL handle) { x += ws[i]->wayland.x; y += ws[i]->wayland.y; + cx = MAX(cx, ws[i]->wayland.x); + cy = MAX(cy, ws[i]->wayland.x); mx = MIN(mx, x + ws[i]->wayland.ww); my = MIN(my, y + ws[i]->wayland.wh); }