Map window at remove only if client has removeall state
This commit is contained in:
parent
d3718da15d
commit
6fe9b17e83
12
src/client.c
12
src/client.c
@ -1387,30 +1387,30 @@ client_remove(struct client *c)
|
||||
{
|
||||
c->flags |= CLIENT_DYING;
|
||||
|
||||
client_untab(c);
|
||||
|
||||
XGrabServer(W->dpy);
|
||||
XSetErrorHandler(wmfs_error_handler_dummy);
|
||||
|
||||
XReparentWindow(W->dpy, c->win, W->root, c->rgeo.x, c->rgeo.y);
|
||||
if(c->flags & CLIENT_REMOVEALL)
|
||||
XMapWindow(W->dpy, c->win);
|
||||
XUngrabButton(W->dpy, AnyButton, AnyModifier, c->win);
|
||||
ewmh_set_wm_state(c->win, WithdrawnState);
|
||||
|
||||
client_untab(c);
|
||||
|
||||
/* Remove frame */
|
||||
if(c->titlebar)
|
||||
barwin_remove(c->titlebar);
|
||||
XDestroyWindow(W->dpy, c->frame);
|
||||
|
||||
XSync(W->dpy, false);
|
||||
XSetErrorHandler(wmfs_error_handler);
|
||||
XUngrabServer(W->dpy);
|
||||
|
||||
/* Remove from global client list */
|
||||
SLIST_REMOVE(&W->h.client, c, client, next);
|
||||
|
||||
tag_client(NULL, c);
|
||||
|
||||
free(c);
|
||||
ewmh_get_client_list();
|
||||
XSetErrorHandler(wmfs_error_handler);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include "config.h"
|
||||
#include "client.h"
|
||||
#include "layout.h"
|
||||
#include "systray.h"
|
||||
|
||||
int
|
||||
wmfs_error_handler(Display *d, XErrorEvent *event)
|
||||
@ -243,6 +244,12 @@ wmfs_scan(void)
|
||||
|
||||
if(!wa.override_redirect && wa.map_state == IsViewable)
|
||||
{
|
||||
if(ewmh_get_xembed_state(w[i]))
|
||||
{
|
||||
systray_add(w[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(XGetWindowProperty(W->dpy, w[i], ATOM("_WMFS_TAG"), 0, 32,
|
||||
False, XA_CARDINAL, &rt, &rf, &ir, &il,
|
||||
(unsigned char**)&ret)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user