using mon in function names for consistency reasons
27db9d44
1 file(s) · +11 −11
| 176 | 176 | static void focusstack(const Arg *arg); |
|
| 177 | 177 | static Client *getclient(Window w); |
|
| 178 | 178 | static unsigned long getcolor(const char *colstr); |
|
| 179 | - | static Monitor *getmonitor(Window w); |
|
| 180 | - | static Monitor *getmonitorxy(int x, int y); |
|
| 179 | + | static Monitor *getmon(Window w); |
|
| 180 | + | static Monitor *getmonxy(int x, int y); |
|
| 181 | 181 | static Bool getrootpointer(int *x, int *y); |
|
| 182 | 182 | static long getstate(Window w); |
|
| 183 | 183 | static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size); |
|
| 401 | 401 | ||
| 402 | 402 | click = ClkRootWin; |
|
| 403 | 403 | /* focus monitor if necessary */ |
|
| 404 | - | if((m = getmonitor(ev->window)) && m != selmon) { |
|
| 404 | + | if((m = getmon(ev->window)) && m != selmon) { |
|
| 405 | 405 | unfocus(selmon->sel); |
|
| 406 | 406 | selmon = m; |
|
| 407 | 407 | focus(NULL); |
|
| 747 | 747 | ||
| 748 | 748 | if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) |
|
| 749 | 749 | return; |
|
| 750 | - | if((m = getmonitor(ev->window)) && m != selmon) { |
|
| 750 | + | if((m = getmon(ev->window)) && m != selmon) { |
|
| 751 | 751 | unfocus(selmon->sel); |
|
| 752 | 752 | selmon = m; |
|
| 753 | 753 | } |
|
| 762 | 762 | Monitor *m; |
|
| 763 | 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 | 766 | drawbar(m); |
|
| 767 | 767 | } |
|
| 768 | 768 | ||
| 864 | 864 | } |
|
| 865 | 865 | ||
| 866 | 866 | Monitor * |
|
| 867 | - | getmonitor(Window w) { |
|
| 867 | + | getmon(Window w) { |
|
| 868 | 868 | int x, y; |
|
| 869 | 869 | Client *c; |
|
| 870 | 870 | Monitor *m; |
|
| 871 | 871 | ||
| 872 | 872 | if(w == root && getrootpointer(&x, &y)) |
|
| 873 | - | return getmonitorxy(x, y); |
|
| 873 | + | return getmonxy(x, y); |
|
| 874 | 874 | for(m = mons; m; m = m->next) |
|
| 875 | 875 | if(w == m->barwin) |
|
| 876 | 876 | return m; |
|
| 880 | 880 | } |
|
| 881 | 881 | ||
| 882 | 882 | Monitor * |
|
| 883 | - | getmonitorxy(int x, int y) { |
|
| 883 | + | getmonxy(int x, int y) { |
|
| 884 | 884 | Monitor *m; |
|
| 885 | 885 | ||
| 886 | 886 | for(m = mons; m; m = m->next) |
|
| 1205 | 1205 | } |
|
| 1206 | 1206 | while(ev.type != ButtonRelease); |
|
| 1207 | 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 | 1209 | sendmon(c, m); |
|
| 1210 | 1210 | } |
|
| 1211 | 1211 | ||
| 1314 | 1314 | XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1); |
|
| 1315 | 1315 | XUngrabPointer(dpy, CurrentTime); |
|
| 1316 | 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 | 1318 | sendmon(c, m); |
|
| 1319 | 1319 | } |
|
| 1320 | 1320 | ||
| 1809 | 1809 | /* select focused monitor */ |
|
| 1810 | 1810 | cleanupmons(); |
|
| 1811 | 1811 | mons = newmons; |
|
| 1812 | - | selmon = getmonitor(root); |
|
| 1812 | + | selmon = getmon(root); |
|
| 1813 | 1813 | } |
|
| 1814 | 1814 | ||
| 1815 | 1815 | void |
|