In Wed, 10 Jun 2020 22:10:02 +0200
Hiltjo Posthuma <[email protected]> wrote:

> On Thu, Jun 04, 2020 at 04:01:17PM +0500, Nikita Zlobin wrote:
> > unmanage() after killclient() causes at least one BadDrawable from
> > client. For urxvtd it can crash entire daemon.
> > ---
> >  tabbed.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tabbed.c b/tabbed.c
> > index 4ee4277..6b53d94 100644
> > --- a/tabbed.c
> > +++ b/tabbed.c
> > @@ -219,10 +219,10 @@ cleanup(void)
> >             focus(i);
> >             killclient(NULL);
> >             XReparentWindow(dpy, clients[i]->win, root, 0, 0);
> > -           unmanage(i);
> >     }
> >     free(clients);
> >     clients = NULL;
> > +   XSync(dpy, False);
> >  
> >     XFreePixmap(dpy, dc.drawable);
> >     XFreeGC(dpy, dc.gc);
> > -- 
> > 2.26.2
> > 
> > 
> 
> Hi,
> 
> Is this the correct way to fix it or just a workaround?
> 

It's unlikely to be perfect. Yet I'm new with bare X11 api. But as for
unmanage() call - it seems for me unnecessary in this place, at least
its's source of problem.

And XSync() call - also no idea if necessary, added only because it is
in in unmanaged() too :/ . To make less changes that I don't understand.

Reply via email to