Re: [PATCH] fixed infinite loop in switching within group

Satya Mishra <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <CA+YVjsmKt-FHpmUYpyp9L1u46HZuKMH_8PkpMCq5JpTs2S7GwQ@mail.gmail.com>
Carlos,

Thanks. Not sure why the patch  malformed.

I triggered the bug, then used gdb to see if I could find the reason. After
stepping a few times, I found that it was an infinite loop.

This bug was easy to trigger when using group switch. I use that function
often to switch between emacs frames.

Satya
On Sep 28, 2015 2:57 PM, "Carlos R. Mafra" <[email protected]> wrote:

> Thanks for the patch!
>
> It doesn't apply though, I guess you simply
> copy & pasted into gmail, right? But nevermind,
> I can fix it this time.
>
> But can you tell us how did you find out the problem?
> Sometimes I trigger an infinite loop when alt+tabbing,
> but I could never reproduce it reliably. I hope this is
> the same problem.
>
> Best regards,
> Carlos
>
> On Fri, 25 Sep 2015 at 19:27:38 -0500, Satya N Mishra wrote:
> > From 3394e4b1cd1bebd6b5ee0894c6cbb45440332764 Mon Sep 17 00:00:00 2001
> > From: Satya Mishra <[email protected]>
> > Date: Fri, 25 Sep 2015 15:22:00 -0700
> > Subject: [PATCH] fixed infinite loop in switching within group
> >
> > ---
> >  src/switchpanel.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/switchpanel.c b/src/switchpanel.c
> > index 7ab702f..6d4a9e0 100644
> > --- a/src/switchpanel.c
> > +++ b/src/switchpanel.c
> > @@ -374,8 +374,10 @@ static WMArray *makeWindowListArray(WScreen *scr,
> > int include_unmapped, Bool cla
> >          if ((canReceiveFocus(wwin) != 0) &&
> >              (wwin->flags.mapped || wwin->flags.shaded ||
> > include_unmapped)) {
> >              if (class_only)
> > -                if (!sameWindowClass(scr->focused_window, wwin))
> > +                if (!sameWindowClass(scr->focused_window, wwin)) {
> > +                    wwin = wwin->prev;
> >                      continue;
> > +            }
> >              if (!WFLAGP(wwin, skip_switchpanel))
> >                  WMAddToArray(windows, wwin);
> >          }
> > --
> > 2.4.0
> >
> >
> > --
> > To unsubscribe, send mail to
> [email protected].
>
>
> --
> To unsubscribe, send mail to [email protected].
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.