summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-11 12:52:57 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-11 12:52:57 +0200
commit16c67f32d62849792c8e6d4fdec22a1896f9c279 (patch)
treecb18262f3e207d8229bf0f8833f602a7b7903b03 /client.c
parentadded key handling (diff)
downloaddwm-16c67f32d62849792c8e6d4fdec22a1896f9c279.tar.gz
dwm-16c67f32d62849792c8e6d4fdec22a1896f9c279.zip
fixed several stuff (gridwm gets better and better)
Diffstat (limited to 'client.c')
-rw-r--r--client.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/client.c b/client.c
index 1e693f7..62f4d98 100644
--- a/client.c
+++ b/client.c
@@ -51,7 +51,6 @@ create_client(Window w, XWindowAttributes *wa)
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;
@@ -59,7 +58,6 @@ create_client(Window w, XWindowAttributes *wa)
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;
@@ -87,3 +85,13 @@ manage(Client *c)
87 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); 85 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
88 XFlush(dpy); 86 XFlush(dpy);
89} 87}
88
89Client *
90getclient(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}