dwm.c
changeset 1023 f6b71fb9ea39
parent 1018 03a4ca076c53
child 1024 17a935c3017f
equal deleted inserted replaced
1022:e50432b2ba5f 1023:f6b71fb9ea39
   644 	Client *c;
   644 	Client *c;
   645 	XCrossingEvent *ev = &e->xcrossing;
   645 	XCrossingEvent *ev = &e->xcrossing;
   646 
   646 
   647 	if(ev->mode != NotifyNormal || ev->detail == NotifyInferior)
   647 	if(ev->mode != NotifyNormal || ev->detail == NotifyInferior)
   648 		return;
   648 		return;
   649 	if((c = getclient(ev->window))) {
   649 	if((c = getclient(ev->window)))
   650 		focus(c);
   650 		focus(c);
   651 		if(ISTILE && !c->isfloating)
       
   652 			restack();
       
   653 	}
       
   654 	else if(ev->window == root) {
   651 	else if(ev->window == root) {
   655 		selscreen = True;
   652 		selscreen = True;
   656 		focus(NULL);
   653 		focus(NULL);
   657 	}
   654 	}
   658 }
   655 }
  1593 			nh = wah - 2 * c->border;
  1590 			nh = wah - 2 * c->border;
  1594 		}
  1591 		}
  1595 		else {  /* tile window */
  1592 		else {  /* tile window */
  1596 			if(i == 1) {
  1593 			if(i == 1) {
  1597 				ny = way;
  1594 				ny = way;
  1598 				nx += mc->w + mc->border;
  1595 				nx += mc->w + 2 * mc->border;
  1599 				nw = waw - nx - 2 * c->border;
  1596 				nw = waw - nx - 2 * c->border;
  1600 			}
  1597 			}
  1601 			if(i + 1 == n) /* remainder */
  1598 			if(i + 1 == n) /* remainder */
  1602 				nh = (way + wah) - ny - 2 * c->border;
  1599 				nh = (way + wah) - ny - 2 * c->border;
  1603 			else
  1600 			else
  1604 				nh = th - 2 * c->border;
  1601 				nh = th - 2 * c->border;
  1605 		}
  1602 		}
  1606 		resize(c, nx, ny, nw, nh, RESIZEHINTS);
  1603 		resize(c, nx, ny, nw, nh, RESIZEHINTS);
  1607 		if(n > 1 && th != wah)
  1604 		if(n > 1 && th != wah)
  1608 			ny = c->y + c->h + c->border;
  1605 			ny = c->y + c->h + 2 * c->border;
  1609 	}
  1606 	}
  1610 }
  1607 }
  1611 
  1608 
  1612 void
  1609 void
  1613 togglebar(const char *arg) {
  1610 togglebar(const char *arg) {