equal
deleted
inserted
replaced
210 [MapRequest] = maprequest, |
210 [MapRequest] = maprequest, |
211 [PropertyNotify] = propertynotify, |
211 [PropertyNotify] = propertynotify, |
212 [UnmapNotify] = unmapnotify |
212 [UnmapNotify] = unmapnotify |
213 }; |
213 }; |
214 Atom wmatom[WMLast], netatom[NetLast]; |
214 Atom wmatom[WMLast], netatom[NetLast]; |
215 Bool domax = False; |
215 Bool ismax = False; |
216 Bool otherwm, readin; |
216 Bool otherwm, readin; |
217 Bool running = True; |
217 Bool running = True; |
218 uint tagset[] = {1, 1}; /* after start, first tag is selected */ |
218 uint tagset[] = {1, 1}; /* after start, first tag is selected */ |
219 Client *clients = NULL; |
219 Client *clients = NULL; |
220 Client *sel = NULL; |
220 Client *sel = NULL; |
271 XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); |
271 XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); |
272 c->isbanned = True; |
272 c->isbanned = True; |
273 } |
273 } |
274 |
274 |
275 focus(NULL); |
275 focus(NULL); |
276 if(lt->arrange && !domax) |
276 if(lt->arrange && !ismax) |
277 lt->arrange(); |
277 lt->arrange(); |
278 restack(); |
278 restack(); |
279 } |
279 } |
280 |
280 |
281 void |
281 void |
326 togglemax(NULL); |
326 togglemax(NULL); |
327 } |
327 } |
328 } |
328 } |
329 else if((c = getclient(ev->window))) { |
329 else if((c = getclient(ev->window))) { |
330 focus(c); |
330 focus(c); |
331 if(CLEANMASK(ev->state) != MODKEY || domax) |
331 if(CLEANMASK(ev->state) != MODKEY || ismax) |
332 return; |
332 return; |
333 if(ev->button == Button1) |
333 if(ev->button == Button1) |
334 movemouse(c); |
334 movemouse(c); |
335 else if(ev->button == Button2) |
335 else if(ev->button == Button2) |
336 togglefloating(NULL); |
336 togglefloating(NULL); |
498 } |
498 } |
499 dc.x += dc.w; |
499 dc.x += dc.w; |
500 } |
500 } |
501 if(blw > 0) { |
501 if(blw > 0) { |
502 dc.w = blw; |
502 dc.w = blw; |
503 drawtext(lt->symbol, dc.norm, domax); |
503 drawtext(lt->symbol, dc.norm, ismax); |
504 x = dc.x + dc.w; |
504 x = dc.x + dc.w; |
505 } |
505 } |
506 else |
506 else |
507 x = dc.x; |
507 x = dc.x; |
508 dc.w = TEXTW(stext); |
508 dc.w = TEXTW(stext); |
627 attachstack(c); |
627 attachstack(c); |
628 grabbuttons(c, True); |
628 grabbuttons(c, True); |
629 } |
629 } |
630 sel = c; |
630 sel = c; |
631 if(c) { |
631 if(c) { |
632 if(domax) { |
632 if(ismax) { |
633 XMoveResizeWindow(dpy, c->win, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw); |
633 XMoveResizeWindow(dpy, c->win, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw); |
634 c->ismax = True; |
634 c->ismax = True; |
635 } |
635 } |
636 XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); |
636 XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); |
637 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); |
637 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); |
1192 XWindowChanges wc; |
1192 XWindowChanges wc; |
1193 |
1193 |
1194 drawbar(); |
1194 drawbar(); |
1195 if(!sel) |
1195 if(!sel) |
1196 return; |
1196 return; |
1197 if(domax || sel->isfloating || !lt->arrange) |
1197 if(ismax || sel->isfloating || !lt->arrange) |
1198 XRaiseWindow(dpy, sel->win); |
1198 XRaiseWindow(dpy, sel->win); |
1199 if(!domax && lt->arrange) { |
1199 if(!ismax && lt->arrange) { |
1200 wc.stack_mode = Below; |
1200 wc.stack_mode = Below; |
1201 wc.sibling = barwin; |
1201 wc.sibling = barwin; |
1202 for(c = stack; c; c = c->snext) |
1202 for(c = stack; c; c = c->snext) |
1203 if(!c->isfloating && VISIBLE(c)) { |
1203 if(!c->isfloating && VISIBLE(c)) { |
1204 XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc); |
1204 XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc); |
1510 drawbar(); |
1510 drawbar(); |
1511 } |
1511 } |
1512 |
1512 |
1513 void |
1513 void |
1514 togglemax(const void *arg) { |
1514 togglemax(const void *arg) { |
1515 domax = !domax; |
1515 ismax = !ismax; |
1516 arrange(); |
1516 arrange(); |
1517 } |
1517 } |
1518 |
1518 |
1519 void |
1519 void |
1520 toggletag(const void *arg) { |
1520 toggletag(const void *arg) { |