diff --git a/Makefile b/Makefile index f712030..6b59b91 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,8 @@ config.h: cp config.def.h config.h sowm: sowm.c sowm.h config.h Makefile - $(CC) -O3 $(CFLAGS) -o $@ $< -lX11 -lXinerama $(LDFLAGS) + $(CC) -O3 $(CFLAGS) -o $@ $< -lX11 -lXinerama \ + $(LDFLAGS) -Wno-missing-braces install: all install -Dm755 sowm $(DESTDIR)$(BINDIR)/sowm diff --git a/sowm.c b/sowm.c index 9a8c246..419adfe 100644 --- a/sowm.c +++ b/sowm.c @@ -64,8 +64,8 @@ void win_half(const Arg arg) { win_size(cur->w, &wx, &wy, &ww, &wh); XMoveResizeWindow(d, cur->w, \ - (m == 'w' ? wx : m == 'e' ? (wx + ww / 2) : wx), - (m == 'n' ? wy : m == 's' ? (wy + wh / 2) : wy), + (m == 'w' ? (unsigned int)wx : m == 'e' ? (wx + ww / 2) : (unsigned int)wx), + (m == 'n' ? (unsigned int)wy : m == 's' ? (wy + wh / 2) : (unsigned int)wy), (m == 'w' ? (ww / 2) : m == 'e' ? (ww / 2) : ww), (m == 'n' ? (wh / 2) : m == 's' ? (wh / 2) : wh)); } @@ -166,7 +166,7 @@ void win_kill(const Arg arg) { if (cur) XKillClient(d, cur->w); } -int multimonitor_action (int action) { // action = 0 -> center; action = 1 -> fs +int multimonitor_action (int action) { /* 0 -> center, 1 -> fs */ if (!XineramaIsActive(d)) return 1; XineramaScreenInfo *si = XineramaQueryScreens(d, &monitors); for (int i = 0; i < monitors; i++) {