revert some leaks into other code files

This commit is contained in:
IoIxD 2025-12-05 22:48:02 -07:00
commit 71aac9987c
4 changed files with 10 additions and 12 deletions

View file

@ -5,10 +5,10 @@ int main() {
MwWidget window;
MwLibraryInit();
window = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 8 + 16 + 8 + 16 * 10 + 8, 8 + 16 + 8 + 16 + 8,
MwNtitle, "checkbox",
NULL);
MwNtitle, "checkbox",
NULL);
MwVaCreateWidget(MwCheckBoxClass, "cb1", window, 8, 8, 16, 16,
NULL);

View file

@ -56,13 +56,13 @@ void resize(MwWidget w, void* user, void* client) {
int main() {
MwWidget window;
int i;
int i;
MwLibraryInit();
window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, (ww = 500), (wh = 500),
MwNtitle, "rotate",
NULL);
MwNtitle, "rotate",
NULL);
for(i = 0; i < (int)(sizeof(buttons) / sizeof(buttons[0])); i++) {
const char* color = "";

View file

@ -34,8 +34,6 @@ struct _MwLLCommon {
void* user;
int copy_buffer;
int type;
int success;
int do_redraw;
MwLLHandler handler;
};

View file

@ -8,6 +8,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -468,7 +469,7 @@ static void setup_toplevel(MwLL r, int x, int y) {
r->wayland.display = wl_display_connect(NULL);
if(r->wayland.display == NULL) {
printf("wayland: failed to create display\n");
r->common.success = MwFALSE;
raise(SIGTRAP);
return;
}
@ -477,7 +478,7 @@ static void setup_toplevel(MwLL r, int x, int y) {
wl_registry_add_listener(r->wayland.registry, &r->wayland.registry_listener, r);
if(wl_display_roundtrip(r->wayland.display) == -1) {
printf("roundtrip failed\n");
r->common.success = MwFALSE;
raise(SIGTRAP);
return;
}
@ -488,7 +489,7 @@ static void setup_toplevel(MwLL r, int x, int y) {
WAYLAND_GET_INTERFACE(r->wayland, wl_seat)->context == NULL) {
printf("no wl_shm, wl_compositor, wl_seat, or xdg_wm_base support\n");
r->common.success = MwFALSE;
raise(SIGTRAP);
return;
}
@ -625,7 +626,6 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
r->wayland.parent = parent;
r->wayland.force_redraw = MwFALSE;
r->common.success = MwTRUE;
r->wayland.subwidgets = NULL;
if(parent == NULL) {