diff --git a/examples/basic/document.c b/examples/basic/document.c
index f9529fe..cea0170 100644
--- a/examples/basic/document.c
+++ b/examples/basic/document.c
@@ -22,11 +22,12 @@ static void MWAPI resize_window(MwWidget handle, void* user, void* call) {
}
static void MWAPI layout_document(MwWidget handle, void* user, void* call) {
- int height = *(int*)call;
+ MwRect size = *(MwRect*)call;
- MwViewportSetSize(viewport, MwGetInteger(document, MwNwidth), height);
+ MwViewportSetSize(viewport, size.width, size.height);
MwVaApply(document,
- MwNheight, height,
+ MwNwidth, size.width,
+ MwNheight, size.height,
NULL);
}
diff --git a/milsko.xml b/milsko.xml
index 7a7410a..81d6e13 100644
--- a/milsko.xml
+++ b/milsko.xml
@@ -105,15 +105,13 @@
-
-
-
+
+
+
-
-
@@ -206,7 +204,7 @@
-
+
@@ -1072,10 +1070,20 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pl/rules.pl b/pl/rules.pl
index f12c092..7a58a97 100644
--- a/pl/rules.pl
+++ b/pl/rules.pl
@@ -66,7 +66,7 @@ if (grep(/^wayland$/, @backends)) {
scan_wayland_protocol("unstable", "primary-selection", "-unstable-v1");
scan_wayland_protocol("unstable", "pointer-constraints", "-unstable-v1");
scan_wayland_protocol("unstable", "relative-pointer", "-unstable-v1");
- scan_wayland_protocol("staging", "fifo", "-v1");
+ scan_wayland_protocol("staging", "fifo", "-v1");
scan_wayland_protocol_from_file("wlr-layer-shell",
"wlr-layer-shell-unstable-v1.xml");
diff --git a/src/backend/cairo.c b/src/backend/cairo.c
index 9dab1c1..3f1e18c 100644
--- a/src/backend/cairo.c
+++ b/src/backend/cairo.c
@@ -219,8 +219,8 @@ static void MwLLFreeColorImpl(MwLLColor color) {}
static MwBool lmao = MwFALSE;
static int MwLLPendingImpl(MwLL handle) {
- lmao = !lmao;
- return lmao;
+ lmao = !lmao;
+ return lmao;
}
static void MwLLNextEventImpl(MwLL handle) {
MwLLDispatch(handle, draw, NULL);
@@ -264,10 +264,10 @@ static void MwLLRaiseImpl(MwLL handle) {}
static void MwLLClipImpl(MwLL handle, MwRect* rect) {}
static void MwLLSetupDragAndDropImpl(MwLL handle) {}
static int MwLLCairoCallInitImpl(void) {
- if(cairo_load_funcs() != 0) {
- return 1;
- }
- return 0;
+ if(cairo_load_funcs() != 0) {
+ return 1;
+ }
+ return 0;
}
#include "call.c"
CALL(Cairo);
diff --git a/src/widget/document.c b/src/widget/document.c
index 1f48cec..d6aec38 100644
--- a/src/widget/document.c
+++ b/src/widget/document.c
@@ -498,6 +498,7 @@ static void layout(MwWidget handle) {
MwFLFont* fontstack = NULL;
MwRect clickable;
char* c_title = NULL;
+ MwRect size;
arrput(fontstack, NULL);
@@ -612,8 +613,9 @@ static void layout(MwWidget handle) {
l->font = TOPFONT;
}
- y += MwTextHeight(handle, TOPFONT, "M");
- MwDispatchUserHandler(handle, MwNlayoutHandler, &y);
+ size.width = w;
+ size.height = y + MwTextHeight(handle, TOPFONT, "M");
+ MwDispatchUserHandler(handle, MwNlayoutHandler, &size);
arrfree(fontstack);