dwm.c
changeset 1115 61f7a3e134e9
parent 1114 31b3935773cb
child 1116 73ef516a4a88
equal deleted inserted replaced
1114:31b3935773cb 1115:61f7a3e134e9
  1000 
  1000 
  1001 	c = emallocz(sizeof(Client));
  1001 	c = emallocz(sizeof(Client));
  1002 	c->tags = emallocz(TAGSZ);
  1002 	c->tags = emallocz(TAGSZ);
  1003 	c->win = w;
  1003 	c->win = w;
  1004 
  1004 
  1005 	applyrules(c);
       
  1006 
       
  1007 	c->x = wa->x + sx;
  1005 	c->x = wa->x + sx;
  1008 	c->y = wa->y + sy;
  1006 	c->y = wa->y + sy;
  1009 	c->w = wa->width;
  1007 	c->w = wa->width;
  1010 	c->h = wa->height;
  1008 	c->h = wa->height;
  1011 	c->oldborder = wa->border_width;
  1009 	c->oldborder = wa->border_width;
  1036 	updatetitle(c);
  1034 	updatetitle(c);
  1037 	if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success))
  1035 	if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success))
  1038 		for(t = clients; t && t->win != trans; t = t->next);
  1036 		for(t = clients; t && t->win != trans; t = t->next);
  1039 	if(t)
  1037 	if(t)
  1040 		memcpy(c->tags, t->tags, TAGSZ);
  1038 		memcpy(c->tags, t->tags, TAGSZ);
       
  1039 	else
       
  1040 		applyrules(c);
  1041 	if(!c->isfloating)
  1041 	if(!c->isfloating)
  1042 		c->isfloating = (rettrans == Success) || c->isfixed;
  1042 		c->isfloating = (rettrans == Success) || c->isfixed;
  1043 	attach(c);
  1043 	attach(c);
  1044 	attachstack(c);
  1044 	attachstack(c);
  1045 	XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); /* some windows require this */
  1045 	XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); /* some windows require this */