dwm.c
changeset 1121 898952a1689d
parent 1120 8bd946fbb015
child 1122 6f93af279e0a
equal deleted inserted replaced
1120:8bd946fbb015 1121:898952a1689d
    42 #include <X11/Xutil.h>
    42 #include <X11/Xutil.h>
    43 /*
    43 /*
    44  * TODO: Idea:
    44  * TODO: Idea:
    45  * I intend to not provide real Xinerama support, but instead having a Column
    45  * I intend to not provide real Xinerama support, but instead having a Column
    46  * tilecols[] array which is used by tile(), and a Column maxcols[] arrays which is used by
    46  * tilecols[] array which is used by tile(), and a Column maxcols[] arrays which is used by
    47  * maximise(). Those arrays should be initialized in config.h. For simplicity
    47  * monocle(). Those arrays should be initialized in config.h. For simplicity
    48  * reasons mwfact should be replaced with a more advanced method which
    48  * reasons mwfact should be replaced with a more advanced method which
    49  * implements the same, but using the boundary between tilecols[0] and
    49  * implements the same, but using the boundary between tilecols[0] and
    50  * tilecols[1] instead. Besides this, get rid of BARPOS and use instead the
    50  * tilecols[1] instead. Besides this, get rid of BARPOS and use instead the
    51  * following mechanism:
    51  * following mechanism:
    52  *
    52  *
   170 void keypress(XEvent *e);
   170 void keypress(XEvent *e);
   171 void killclient(const char *arg);
   171 void killclient(const char *arg);
   172 void manage(Window w, XWindowAttributes *wa);
   172 void manage(Window w, XWindowAttributes *wa);
   173 void mappingnotify(XEvent *e);
   173 void mappingnotify(XEvent *e);
   174 void maprequest(XEvent *e);
   174 void maprequest(XEvent *e);
   175 void maximise(void);
   175 void monocle(void);
   176 void movemouse(Client *c);
   176 void movemouse(Client *c);
   177 Client *nexttiled(Client *c);
   177 Client *nexttiled(Client *c);
   178 void propertynotify(XEvent *e);
   178 void propertynotify(XEvent *e);
   179 void quit(const char *arg);
   179 void quit(const char *arg);
   180 void reapply(const char *arg);
   180 void reapply(const char *arg);
  1084 	if(!getclient(ev->window))
  1084 	if(!getclient(ev->window))
  1085 		manage(ev->window, &wa);
  1085 		manage(ev->window, &wa);
  1086 }
  1086 }
  1087 
  1087 
  1088 void
  1088 void
  1089 maximise(void) {
  1089 monocle(void) {
  1090 	Client *c;
  1090 	Client *c;
  1091 
  1091 
  1092 	domwfact = dozoom = False;
  1092 	domwfact = dozoom = False;
  1093 	for(c = nexttiled(clients); c; c = nexttiled(c->next))
  1093 	for(c = nexttiled(clients); c; c = nexttiled(c->next))
  1094 		resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
  1094 		resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);