diff --git a/Makefile.pl b/Makefile.pl index ea9f90c..b244aa1 100755 --- a/Makefile.pl +++ b/Makefile.pl @@ -226,7 +226,7 @@ foreach my $l (@library_targets) { } print(OUT "${l}: ${s}\n"); - print(OUT " \$(CC) $warn \$(CFLAGS\) \$\(INCDIR) -c -o ${l} ${s}\n"); + print(OUT " \$(CC) $warn \$\(INCDIR) \$(CFLAGS\) -c -o ${l} ${s}\n"); } print(OUT "\n"); print(OUT "\n"); diff --git a/src/backend/x11.c b/src/backend/x11.c index 8ece5d8..ce6dae0 100644 --- a/src/backend/x11.c +++ b/src/backend/x11.c @@ -159,6 +159,7 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { r->x11.toplevel = 0; } r->x11.window = XCreateSimpleWindow(r->x11.display, p, px, py, width, height, 0, 0, WhitePixel(r->x11.display, DefaultScreen(r->x11.display))); + sh.flags = PWinGravity; sh.win_gravity = StaticGravity; XSetWMNormalHints(r->x11.display, r->x11.window, &sh); @@ -412,6 +413,7 @@ static void MwLLFreeColorImpl(MwLLColor color) { static int MwLLPendingImpl(MwLL handle) { XEvent ev; + if(XCheckTypedWindowEvent(handle->x11.display, handle->x11.window, ClientMessage, &ev) || XCheckWindowEvent(handle->x11.display, handle->x11.window, mask, &ev)) { XPutBackEvent(handle->x11.display, &ev); return 1; @@ -421,6 +423,7 @@ static int MwLLPendingImpl(MwLL handle) { static void MwLLNextEventImpl(MwLL handle) { XEvent ev; + while(XCheckTypedWindowEvent(handle->x11.display, handle->x11.window, ClientMessage, &ev) || XCheckWindowEvent(handle->x11.display, handle->x11.window, mask, &ev)) { int render = 0; if(ev.type == Expose) { diff --git a/src/core.c b/src/core.c index d9a5d65..52a8f23 100644 --- a/src/core.c +++ b/src/core.c @@ -121,6 +121,7 @@ MwWidget MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent, h->parent = parent; h->children = NULL; + if(widget_class != NULL) { if((h->lowlevel = MwLLCreate(parent == NULL ? NULL : parent->lowlevel, x, y, width, height)) == NULL) { free(h->name);