dwm.c
changeset 1117 fac7660be3de
parent 1116 73ef516a4a88
child 1118 e8efb587e751
equal deleted inserted replaced
1116:73ef516a4a88 1117:fac7660be3de
    46 
    46 
    47 /* macros */
    47 /* macros */
    48 #define BUTTONMASK		(ButtonPressMask|ButtonReleaseMask)
    48 #define BUTTONMASK		(ButtonPressMask|ButtonReleaseMask)
    49 #define CLEANMASK(mask)		(mask & ~(numlockmask|LockMask))
    49 #define CLEANMASK(mask)		(mask & ~(numlockmask|LockMask))
    50 #define LENGTH(x)		(sizeof x / sizeof x[0])
    50 #define LENGTH(x)		(sizeof x / sizeof x[0])
    51 #define MAXTAGLEN		16
    51 #define MAXLEN			16
    52 #define MOUSEMASK		(BUTTONMASK|PointerMotionMask)
    52 #define MOUSEMASK		(BUTTONMASK|PointerMotionMask)
    53 
    53 
    54 
    54 
    55 /* enums */
    55 /* enums */
    56 enum { BarTop, BarBot, BarOff };			/* bar position */
    56 enum { BarTop, BarBot, BarOff };			/* bar position */
   151 void keypress(XEvent *e);
   151 void keypress(XEvent *e);
   152 void killclient(const char *arg);
   152 void killclient(const char *arg);
   153 void manage(Window w, XWindowAttributes *wa);
   153 void manage(Window w, XWindowAttributes *wa);
   154 void mappingnotify(XEvent *e);
   154 void mappingnotify(XEvent *e);
   155 void maprequest(XEvent *e);
   155 void maprequest(XEvent *e);
   156 void monocle(void);
   156 void maximise(void);
   157 void movemouse(Client *c);
   157 void movemouse(Client *c);
   158 Client *nexttiled(Client *c);
   158 Client *nexttiled(Client *c);
   159 void propertynotify(XEvent *e);
   159 void propertynotify(XEvent *e);
   160 void quit(const char *arg);
   160 void quit(const char *arg);
   161 void reapply(const char *arg);
   161 void reapply(const char *arg);
  1071 	if(!getclient(ev->window))
  1071 	if(!getclient(ev->window))
  1072 		manage(ev->window, &wa);
  1072 		manage(ev->window, &wa);
  1073 }
  1073 }
  1074 
  1074 
  1075 void
  1075 void
  1076 monocle(void) {
  1076 maximise(void) {
  1077 	Client *c;
  1077 	Client *c;
  1078 
  1078 
  1079 	domwfact = dozoom = False;
  1079 	domwfact = dozoom = False;
  1080 	for(c = clients; c; c = c->next)
  1080 	for(c = nexttiled(clients); c; c = nexttiled(c->next))
  1081 		if(isvisible(c))
  1081 		resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
  1082 			resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
       
  1083 }
  1082 }
  1084 
  1083 
  1085 void
  1084 void
  1086 movemouse(Client *c) {
  1085 movemouse(Client *c) {
  1087 	int x1, y1, ocx, ocy, di, nx, ny;
  1086 	int x1, y1, ocx, ocy, di, nx, ny;