From 09a514cd5edf98c9fc6ac0e1a46d2f3b32b9093a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 18 Dec 2019 11:41:21 +0000 Subject: [PATCH] sowm: Enable missing prototypes warning and define win_prev. --- Makefile | 2 +- config.def.h | 4 +++- sowm.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 50ed1cb..c216b04 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS+= -std=c99 -Wall -Wextra -pedantic +CFLAGS+= -std=c99 -Wall -Wextra -Wmissing-prototypes -pedantic LDADD+= -lX11 LDFLAGS= PREFIX?= /usr diff --git a/config.def.h b/config.def.h index aaaf38d..cae2009 100644 --- a/config.def.h +++ b/config.def.h @@ -17,7 +17,9 @@ static struct key keys[] = { {MOD, XK_q, win_kill, {0}}, {MOD, XK_c, win_center, {0}}, {MOD, XK_f, win_fs, {0}}, - {Mod1Mask, XK_Tab, win_next, {0}}, + + {Mod1Mask, XK_Tab, win_next, {0}}, + {Mod1Mask|ShiftMask, XK_Tab, win_prev, {0}}, {MOD, XK_d, run, {.com = menu}}, {MOD, XK_w, run, {.com = colors}}, diff --git a/sowm.c b/sowm.c index 6a2d198..48222c6 100644 --- a/sowm.c +++ b/sowm.c @@ -212,7 +212,7 @@ void win_to_ws(const Arg arg) { void win_prev() { if (!cur) return; - + XRaiseWindow(d, cur->prev->w); win_focus(cur->prev); }