This commit is contained in:
parent
a249b3264d
commit
85c5409790
2 changed files with 6 additions and 5 deletions
|
|
@ -35,7 +35,9 @@ int main() {
|
||||||
// MwNpixmap, px,
|
// MwNpixmap, px,
|
||||||
// NULL);
|
// NULL);
|
||||||
MwViewportSetSize(vp, 1024, 1024);
|
MwViewportSetSize(vp, 1024, 1024);
|
||||||
MwCreateWidget(MwButtonClass, "btn", MwViewportGetViewport(vp), 256, 256, 128, 128);
|
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);
|
MwAddUserHandler(w, MwNresizeHandler, resize, NULL);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1747,10 +1747,9 @@ static void clip(MwLL handle) {
|
||||||
x += ws[i]->wayland.x;
|
x += ws[i]->wayland.x;
|
||||||
y += ws[i]->wayland.y;
|
y += ws[i]->wayland.y;
|
||||||
|
|
||||||
if(i > 0){
|
cx = MAX(cx, ws[i]->wayland.x);
|
||||||
cx = MAX(cx, ws[i]->wayland.x);
|
cy = MAX(cy, ws[i]->wayland.y);
|
||||||
cy = MAX(cy, ws[i]->wayland.y);
|
|
||||||
}
|
|
||||||
mx = MIN(mx, x + ws[i]->wayland.ww);
|
mx = MIN(mx, x + ws[i]->wayland.ww);
|
||||||
my = MIN(my, y + ws[i]->wayland.wh);
|
my = MIN(my, y + ws[i]->wayland.wh);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue