comparison client.c @ 9:d567f430a81d

fixed several stuff (gridwm gets better and better)
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 11 Jul 2006 12:52:57 +0200
parents 49e2fc9fb94f
children 703255003abb
comparison
equal deleted inserted replaced
8:7066ff2fe8bc 9:d567f430a81d
49 c->r[RFloat].y = wa->y; 49 c->r[RFloat].y = wa->y;
50 c->r[RFloat].width = wa->width; 50 c->r[RFloat].width = wa->width;
51 c->r[RFloat].height = wa->height; 51 c->r[RFloat].height = wa->height;
52 c->border = wa->border_width; 52 c->border = wa->border_width;
53 XSetWindowBorderWidth(dpy, c->win, 0); 53 XSetWindowBorderWidth(dpy, c->win, 0);
54 c->proto = win_proto(c->win);
55 XGetTransientForHint(dpy, c->win, &c->trans); 54 XGetTransientForHint(dpy, c->win, &c->trans);
56 if(!XGetWMNormalHints(dpy, c->win, &c->size, &msize) || !c->size.flags) 55 if(!XGetWMNormalHints(dpy, c->win, &c->size, &msize) || !c->size.flags)
57 c->size.flags = PSize; 56 c->size.flags = PSize;
58 c->fixedsize = 57 c->fixedsize =
59 (c->size.flags & PMinSize && c->size.flags & PMaxSize 58 (c->size.flags & PMinSize && c->size.flags & PMaxSize
60 && c->size.min_width == c->size.max_width 59 && c->size.min_width == c->size.max_width
61 && c->size.min_height == c->size.max_height); 60 && c->size.min_height == c->size.max_height);
62 XAddToSaveSet(dpy, c->win);
63 update_client_name(c); 61 update_client_name(c);
64 twa.override_redirect = 1; 62 twa.override_redirect = 1;
65 twa.background_pixmap = ParentRelative; 63 twa.background_pixmap = ParentRelative;
66 twa.event_mask = ExposureMask; 64 twa.event_mask = ExposureMask;
67 65
85 { 83 {
86 XMapRaised(dpy, c->win); 84 XMapRaised(dpy, c->win);
87 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); 85 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
88 XFlush(dpy); 86 XFlush(dpy);
89 } 87 }
88
89 Client *
90 getclient(Window w)
91 {
92 Client *c;
93 for(c = clients; c; c = c->next)
94 if(c->win == w)
95 return c;
96 return NULL;
97 }