In dwm.c the functions are declared in alphabetical order and then are
defined in alphabetical order. The exception for this is main, for
obvious reasons. However, setclientstate() and updatebarpos() are
declared in the correct order, but defined in the wrong order. There
doesn't seem to be any reason for this, so this patch corrects that.
---
diff --git a/dwm.c b/dwm.c
index c98678d..6fe6eb8 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1423,15 +1423,6 @@ sendmon(Client *c, Monitor *m)
arrange(NULL);
}
-void
-setclientstate(Client *c, long state)
-{
- long data[] = { state, None };
-
- XChangeProperty(dpy, c->win, wmatom[WMState], wmatom[WMState], 32,
- PropModeReplace, (unsigned char *)data, 2);
-}
-
int
sendevent(Client *c, Atom proto)
{
@@ -1458,6 +1449,15 @@ sendevent(Client *c, Atom proto)
}
void
+setclientstate(Client *c, long state)
+{
+ long data[] = { state, None };
+
+ XChangeProperty(dpy, c->win, wmatom[WMState], wmatom[WMState], 32,
+ PropModeReplace, (unsigned char *)data, 2);
+}
+
+void
setfocus(Client *c)
{
if (!c->neverfocus) {
@@ -1799,6 +1799,19 @@ unmapnotify(XEvent *e)
}
void
+updatebarpos(Monitor *m)
+{
+ m->wy = m->my;
+ m->wh = m->mh;
+ if (m->showbar) {
+ m->wh -= bh;
+ m->by = m->topbar ? m->wy : m->wy + m->wh;
+ m->wy = m->topbar ? m->wy + bh : m->wy;
+ } else
+ m->by = -bh;
+}
+
+void
updatebars(void)
{
Monitor *m;
@@ -1821,19 +1834,6 @@ updatebars(void)
}
void
-updatebarpos(Monitor *m)
-{
- m->wy = m->my;
- m->wh = m->mh;
- if (m->showbar) {
- m->wh -= bh;
- m->by = m->topbar ? m->wy : m->wy + m->wh;
- m->wy = m->topbar ? m->wy + bh : m->wy;
- } else
- m->by = -bh;
-}
-
-void
updateclientlist()
{
Client *c;