summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dwm.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/dwm.c b/dwm.c
index 9779654..5934a6c 100644
--- a/dwm.c
+++ b/dwm.c
@@ -176,8 +176,8 @@ static void focusin(XEvent *e);
176static void focusstack(const Arg *arg); 176static void focusstack(const Arg *arg);
177static Client *getclient(Window w); 177static Client *getclient(Window w);
178static unsigned long getcolor(const char *colstr); 178static unsigned long getcolor(const char *colstr);
179static Monitor *getmonitor(Window w); 179static Monitor *getmon(Window w);
180static Monitor *getmonitorxy(int x, int y); 180static Monitor *getmonxy(int x, int y);
181static Bool getrootpointer(int *x, int *y); 181static Bool getrootpointer(int *x, int *y);
182static long getstate(Window w); 182static long getstate(Window w);
183static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size); 183static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
@@ -401,7 +401,7 @@ buttonpress(XEvent *e) {
401 401
402 click = ClkRootWin; 402 click = ClkRootWin;
403 /* focus monitor if necessary */ 403 /* focus monitor if necessary */
404 if((m = getmonitor(ev->window)) && m != selmon) { 404 if((m = getmon(ev->window)) && m != selmon) {
405 unfocus(selmon->sel); 405 unfocus(selmon->sel);
406 selmon = m; 406 selmon = m;
407 focus(NULL); 407 focus(NULL);
@@ -747,7 +747,7 @@ enternotify(XEvent *e) {
747 747
748 if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) 748 if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
749 return; 749 return;
750 if((m = getmonitor(ev->window)) && m != selmon) { 750 if((m = getmon(ev->window)) && m != selmon) {
751 unfocus(selmon->sel); 751 unfocus(selmon->sel);
752 selmon = m; 752 selmon = m;
753 } 753 }
@@ -762,7 +762,7 @@ expose(XEvent *e) {
762 Monitor *m; 762 Monitor *m;
763 XExposeEvent *ev = &e->xexpose; 763 XExposeEvent *ev = &e->xexpose;
764 764
765 if(ev->count == 0 && (m = getmonitor(ev->window))) 765 if(ev->count == 0 && (m = getmon(ev->window)))
766 drawbar(m); 766 drawbar(m);
767} 767}
768 768
@@ -864,13 +864,13 @@ getcolor(const char *colstr) {
864} 864}
865 865
866Monitor * 866Monitor *
867getmonitor(Window w) { 867getmon(Window w) {
868 int x, y; 868 int x, y;
869 Client *c; 869 Client *c;
870 Monitor *m; 870 Monitor *m;
871 871
872 if(w == root && getrootpointer(&x, &y)) 872 if(w == root && getrootpointer(&x, &y))
873 return getmonitorxy(x, y); 873 return getmonxy(x, y);
874 for(m = mons; m; m = m->next) 874 for(m = mons; m; m = m->next)
875 if(w == m->barwin) 875 if(w == m->barwin)
876 return m; 876 return m;
@@ -880,7 +880,7 @@ getmonitor(Window w) {
880} 880}
881 881
882Monitor * 882Monitor *
883getmonitorxy(int x, int y) { 883getmonxy(int x, int y) {
884 Monitor *m; 884 Monitor *m;
885 885
886 for(m = mons; m; m = m->next) 886 for(m = mons; m; m = m->next)
@@ -1205,7 +1205,7 @@ movemouse(const Arg *arg) {
1205 } 1205 }
1206 while(ev.type != ButtonRelease); 1206 while(ev.type != ButtonRelease);
1207 XUngrabPointer(dpy, CurrentTime); 1207 XUngrabPointer(dpy, CurrentTime);
1208 if((m = getmonitorxy(c->x + c->w / 2, c->y + c->h / 2)) != selmon) 1208 if((m = getmonxy(c->x + c->w / 2, c->y + c->h / 2)) != selmon)
1209 sendmon(c, m); 1209 sendmon(c, m);
1210} 1210}
1211 1211
@@ -1314,7 +1314,7 @@ resizemouse(const Arg *arg) {
1314 XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1); 1314 XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
1315 XUngrabPointer(dpy, CurrentTime); 1315 XUngrabPointer(dpy, CurrentTime);
1316 while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); 1316 while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
1317 if((m = getmonitorxy(c->x + c->w / 2, c->y + c->h / 2)) != selmon) 1317 if((m = getmonxy(c->x + c->w / 2, c->y + c->h / 2)) != selmon)
1318 sendmon(c, m); 1318 sendmon(c, m);
1319} 1319}
1320 1320
@@ -1809,7 +1809,7 @@ updategeom(void) {
1809 /* select focused monitor */ 1809 /* select focused monitor */
1810 cleanupmons(); 1810 cleanupmons();
1811 mons = newmons; 1811 mons = newmons;
1812 selmon = getmonitor(root); 1812 selmon = getmon(root);
1813} 1813}
1814 1814
1815void 1815void