diff --git a/examples/basic/checkbox.c b/examples/basic/checkbox.c index 546b7df..972cb2c 100644 --- a/examples/basic/checkbox.c +++ b/examples/basic/checkbox.c @@ -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); diff --git a/examples/basic/rotate.c b/examples/basic/rotate.c index 835993d..c3b85d7 100644 --- a/examples/basic/rotate.c +++ b/examples/basic/rotate.c @@ -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 = ""; diff --git a/include/Mw/LowLevel.h b/include/Mw/LowLevel.h index e8721dd..47f367a 100644 --- a/include/Mw/LowLevel.h +++ b/include/Mw/LowLevel.h @@ -34,8 +34,6 @@ struct _MwLLCommon { void* user; int copy_buffer; int type; - int success; - int do_redraw; MwLLHandler handler; }; diff --git a/src/backend/wayland.c b/src/backend/wayland.c index ba36212..53b4483 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -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) {