diff options
| author | Anselm R Garbe <anselm@garbe.us> | 2009-06-27 18:42:10 +0100 |
|---|---|---|
| committer | Anselm R Garbe <anselm@garbe.us> | 2009-06-27 18:42:10 +0100 |
| commit | 27db9d44489fea54275de9d25a9eff7118ebb3ea (patch) | |
| tree | 096c2029c9e7c7fd06700221391372bc3ccddb34 /dwm.c | |
| parent | fixed several issues with focus handling via mouse, also added sending client... (diff) | |
| download | dwm-27db9d44489fea54275de9d25a9eff7118ebb3ea.tar.gz dwm-27db9d44489fea54275de9d25a9eff7118ebb3ea.zip | |
using mon in function names for consistency reasons
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 22 |
1 files changed, 11 insertions, 11 deletions
| @@ -176,8 +176,8 @@ static void focusin(XEvent *e); | |||
| 176 | static void focusstack(const Arg *arg); | 176 | static void focusstack(const Arg *arg); |
| 177 | static Client *getclient(Window w); | 177 | static Client *getclient(Window w); |
| 178 | static unsigned long getcolor(const char *colstr); | 178 | static unsigned long getcolor(const char *colstr); |
| 179 | static Monitor *getmonitor(Window w); | 179 | static Monitor *getmon(Window w); |
| 180 | static Monitor *getmonitorxy(int x, int y); | 180 | static Monitor *getmonxy(int x, int y); |
| 181 | static Bool getrootpointer(int *x, int *y); | 181 | static Bool getrootpointer(int *x, int *y); |
| 182 | static long getstate(Window w); | 182 | static long getstate(Window w); |
| 183 | static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size); | 183 | static 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 | ||
| 866 | Monitor * | 866 | Monitor * |
| 867 | getmonitor(Window w) { | 867 | getmon(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 | ||
| 882 | Monitor * | 882 | Monitor * |
| 883 | getmonitorxy(int x, int y) { | 883 | getmonxy(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 | ||
| 1815 | void | 1815 | void |
