dwm.c
changeset 1459 a5eecc6d674f
parent 1458 e30739eebeed
child 1460 606761ddf6d6
equal deleted inserted replaced
1458:e30739eebeed 1459:a5eecc6d674f
  1050 
  1050 
  1051 	if(!(c = malloc(sizeof(Client))))
  1051 	if(!(c = malloc(sizeof(Client))))
  1052 		die("fatal: could not malloc() %u bytes\n", sizeof(Client));
  1052 		die("fatal: could not malloc() %u bytes\n", sizeof(Client));
  1053 	*c = cz;
  1053 	*c = cz;
  1054 	c->win = w;
  1054 	c->win = w;
       
  1055 	updatetitle(c);
  1055 	if(XGetTransientForHint(dpy, w, &trans))
  1056 	if(XGetTransientForHint(dpy, w, &trans))
  1056 		t = wintoclient(trans);
  1057 		t = wintoclient(trans);
  1057 	if(t) {
  1058 	if(t) {
  1058 		c->mon = t->mon;
  1059 		c->mon = t->mon;
  1059 		c->tags = t->tags;
  1060 		c->tags = t->tags;
  1089 	XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
  1090 	XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
  1090 	configure(c); /* propagates border_width, if size doesn't change */
  1091 	configure(c); /* propagates border_width, if size doesn't change */
  1091 	updatesizehints(c);
  1092 	updatesizehints(c);
  1092 	XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
  1093 	XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
  1093 	grabbuttons(c, False);
  1094 	grabbuttons(c, False);
  1094 	updatetitle(c);
       
  1095 	if(!c->isfloating)
  1095 	if(!c->isfloating)
  1096 		c->isfloating = trans != None || c->isfixed;
  1096 		c->isfloating = trans != None || c->isfixed;
  1097 	if(c->isfloating)
  1097 	if(c->isfloating)
  1098 		XRaiseWindow(dpy, c->win);
  1098 		XRaiseWindow(dpy, c->win);
  1099 	attach(c);
  1099 	attach(c);