Johann Haarhoff wrote:
> Thanks for a great new feature. I will try to use it regularly over the
> next few days for testing.

You're welcome! :-)


>> +    tmp = wwin;
>> +    /* TODO: Is the focused window always the last in the list? */
>> +    while (tmp->prev) {
>> +        /* ignore windows in other workspaces */
>> +        if (tmp->prev->frame->workspace !=
>> wwin->screen_ptr->current_workspace) {
>> +            tmp = tmp->prev;
>> +            continue;
>> +        }
>> +        tmp = tmp->prev;
> 
> Perhaps instead of iterating the window list yourself, you could use
> makeWindowListArray in switchpanel.c which will populate an array of
> windows for you without worrying about the question in your TODO?

Perhaps. There are more ways to solve the same problem, I just wanted
to know for sure if my way of solving it is correct :-)

The fact is that yesterday I had a while (tmp->next) too, and i put
a printf() in there and it never appeared during my tests. I looked
at window.h and there is a "focused" entry with a comment saying that
you should use that to traverse the list, but it doesn't say if
you should use ->prev or ->next.


-- 
To unsubscribe, send mail to [email protected].

Reply via email to