dwm-meillo
diff client.c @ 725:d99be681d502
handling WM_STATE seems to make DnD in gtk/qt apps working, well let's handle this in dwm as well
author | Anselm R. Garbe <arg@suckless.org> |
---|---|
date | Sun, 28 Jan 2007 20:29:41 +0100 |
parents | d3876aa79292 |
children | 8997e28553a8 |
line diff
1.1 --- a/client.c Fri Jan 26 12:41:15 2007 +0100 1.2 +++ b/client.c Sun Jan 28 20:29:41 2007 +0100 1.3 @@ -53,6 +53,13 @@ 1.4 GrabModeAsync, GrabModeSync, None, None); 1.5 } 1.6 1.7 +static void 1.8 +setclientstate(Client *c, long state) { 1.9 + long data[] = {state, None}; 1.10 + XChangeProperty(dpy, c->win, wmatom[WMState], wmatom[WMState], 32, 1.11 + PropModeReplace, (unsigned char *)data, 2); 1.12 +} 1.13 + 1.14 static int 1.15 xerrordummy(Display *dsply, XErrorEvent *ee) { 1.16 return 0; 1.17 @@ -169,6 +176,7 @@ 1.18 stack = clients = c; 1.19 XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); 1.20 XMapWindow(dpy, c->win); 1.21 + setclientstate(c, NormalState); 1.22 if(isvisible(c)) 1.23 focus(c); 1.24 arrange(); 1.25 @@ -293,6 +301,7 @@ 1.26 focus(nc); 1.27 } 1.28 XUngrabButton(dpy, AnyButton, AnyModifier, c->win); 1.29 + setclientstate(c, WithdrawnState); 1.30 free(c->tags); 1.31 free(c); 1.32 XSync(dpy, False);