Revert unmap event handling try

This commit is contained in:
Martin Duquesnoy 2012-02-15 19:17:54 +01:00
parent d6afd65f6f
commit 1ccf09a28a
2 changed files with 11 additions and 13 deletions

View File

@ -316,21 +316,18 @@ event_unmapnotify(XEvent *e)
struct client *c;
struct _systray *s;
if((c = client_gb_win(ev->window)))
if((c = client_gb_win(ev->window))
&& ev->send_event
&& ev->event == W->root)
{
if(!ev->send_event)
{
int d;
unsigned char *ret = NULL;
int d;
unsigned char *ret = NULL;
if(XGetWindowProperty(EVDPY(e), c->win, W->net_atom[wm_state], 0, 2,
False, W->net_atom[wm_state], (Atom*)&d, &d,
(long unsigned int*)&d, (long unsigned int*)&d, &ret) == Success)
if(*ret == NormalState)
client_remove(c);
}
else
client_unmap(c);
if(XGetWindowProperty(EVDPY(e), c->win, W->net_atom[wm_state], 0, 2,
False, W->net_atom[wm_state], (Atom*)&d, &d,
(long unsigned int*)&d, (long unsigned int*)&d, &ret) == Success)
if(*ret == NormalState)
client_remove(c);
}
else if((s = systray_find(ev->window)))
{

View File

@ -215,6 +215,7 @@ ewmh_manage_state(long data[], struct client *c)
else
{
c->flags &= ~CLIENT_FULLSCREEN;
XChangeProperty(W->dpy, c->win, W->net_atom[net_wm_state], XA_ATOM, 32, PropModeReplace,
(unsigned char*)0, 0);
XReparentWindow(W->dpy, c->win, c->frame, c->wgeo.x, c->wgeo.y);