[PATCH] xwayland: Fix infinite loop on quick movement through menus

Pekka Paalanen ppaalanen at gmail.com
Wed Apr 25 03:32:45 PDT 2012


On Wed, 25 Apr 2012 11:52:42 +0200
Tomasz Borowik <timon37 at lavabit.com> wrote:

> On Wed, 25 Apr 2012 11:28:28 +0300
> Pekka Paalanen <ppaalanen at gmail.com> wrote:
> 
> > On Tue, 24 Apr 2012 22:20:26 +0200
> > Tomasz Borowik <timon37 at lavabit.com> wrote:
> > 
> > > From: timon37 <timon37 at lavabit.com>
> > > Date: Tue, 24 Apr 2012 22:13:38 +0200
> > > Subject: [PATCH] Fix infinite loop in xwl_screen_post_damage
> > > 
> > > Happens when first two windows are damaged, then later one is damaged and
> > > the other is unrealized. It makes the damaged windows next point to itself.
> > > 
> > > Triggers most often on menus or tooltips.
> > > ---
> > >  hw/xfree86/xwayland/xwayland-window.c |   10 +++++++++-
> > >  1 files changed, 9 insertions(+), 1 deletions(-)
...
> > > @@ -248,6 +248,14 @@ xwl_unrealize_window(WindowPtr window)
> > >  	wl_buffer_destroy(xwl_window->buffer);
> > >      wl_surface_destroy(xwl_window->surface);
> > >      xorg_list_del(&xwl_window->link);
> > > +    
> > > +    xorg_list_for_each_entry_safe(iter, tmp,
> > > +			     &xwl_screen->damage_window_list, link_damage) {
> > > +	if (iter == xwl_window) {
> > > +	    xorg_list_del(&xwl_window->link_damage);
> > > +	    break;
> > > +	}
> > > +    }
> > >      xorg_list_del(&xwl_window->link_damage);
> > 
> > This second del call seems strange, is it intentional?
> > 
> 
> Nope, error from copy&paste (I'm working on a significantly different tree).
> Sorry about that, should I resend the fixed patch?
> 

Yes, please.


- pq


More information about the wayland-devel mailing list