pinosaur
/
dwm.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implemented focus on enterwindow on titlebars
[dwm.git]
/
client.c
diff --git
a/client.c
b/client.c
index
7bc6772
..
6f6ed99
100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-191,7
+191,7
@@
killclient(Arg *arg)
{
if(!sel)
return;
{
if(!sel)
return;
- if(sel->proto &
WM_PROTOCOL_
DELWIN)
+ if(sel->proto &
PROTO
DELWIN)
sendevent(sel->win, wmatom[WMProtocols], wmatom[WMDelete]);
else
XKillClient(dpy, sel->win);
sendevent(sel->win, wmatom[WMProtocols], wmatom[WMDelete]);
else
XKillClient(dpy, sel->win);
@@
-230,7
+230,7
@@
manage(Window w, XWindowAttributes *wa)
XGetTransientForHint(dpy, c->win, &trans);
twa.override_redirect = 1;
twa.background_pixmap = ParentRelative;
XGetTransientForHint(dpy, c->win, &trans);
twa.override_redirect = 1;
twa.background_pixmap = ParentRelative;
- twa.event_mask = ExposureMask;
+ twa.event_mask = ExposureMask
| EnterWindowMask
;
c->title = XCreateWindow(dpy, root, c->tx, c->ty, c->tw, c->th,
0, DefaultDepth(dpy, screen), CopyFromParent,
c->title = XCreateWindow(dpy, root, c->tx, c->ty, c->tw, c->th,
0, DefaultDepth(dpy, screen), CopyFromParent,
@@
-416,20
+416,18
@@
togglemax(Arg *arg)
void
unmanage(Client *c)
{
void
unmanage(Client *c)
{
- Client **l;
-
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
XDestroyWindow(dpy, c->title);
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
XDestroyWindow(dpy, c->title);
- for(l = &clients; *l && *l != c; l = &(*l)->next);
if(c->prev)
c->prev->next = c->next;
if(c->next)
c->next->prev = c->prev;
if(c->prev)
c->prev->next = c->next;
if(c->next)
c->next->prev = c->prev;
- *l = c->next;
+ if(c == clients)
+ clients = c->next;
if(sel == c) {
sel = getnext(c->next);
if(!sel)
if(sel == c) {
sel = getnext(c->next);
if(!sel)
@@
-450,7
+448,7
@@
unmanage(Client *c)
void
zoom(Arg *arg)
{
void
zoom(Arg *arg)
{
- Client *c
, **l
;
+ Client *c;
if(!sel)
return;
if(!sel)
return;
@@
-461,13
+459,10
@@
zoom(Arg *arg)
}
/* pop */
}
/* pop */
- for(l = &clients; *l && *l != sel; l = &(*l)->next);
if(sel->prev)
sel->prev->next = sel->next;
if(sel->next)
sel->next->prev = sel->prev;
if(sel->prev)
sel->prev->next = sel->next;
if(sel->next)
sel->next->prev = sel->prev;
- *l = sel->next;
-
sel->prev = NULL;
if(clients)
clients->prev = sel;
sel->prev = NULL;
if(clients)
clients->prev = sel;