[xmonad] Re: Combo fix ReleaseResources when no windows are available

Anders Engström ankaan at gmail.com
Tue Feb 24 12:35:42 EST 2009


Ignore the previous patch, I think this solution is better. I also
simplified an unused if-then-else statement with the same expression
in both branches. It would have required a fix anyway to work with
this patch.

Note, the Nothing-branch of f' will never occur. But setting f' to f
was the least confusing solution I could come up with.

While doing these modifications I noticed that the list of focused
windows is never cleared. It will grow bigger and bigger and contain a
list of all windows ever focused in this layout (but only one
occurrence). Or am I missing something? If not, is this really a
viable solution?
Sure, it gives you a history of previously focused windows so that
when one window cease to exist the window focused before it will be
focused (if you aren't there). But isn't it enough to simply focus the
first available window instead? I think it would be enough. What do
you think?

On Sun, Feb 22, 2009 at 16:01, Anders Engström <ankaan at gmail.com> wrote:
> Hello. I dug around some in X.L.Combo and noticed some strangeness,
> integrate cannot return empty lists (but integrate' can). The code
> expect it to return an empty list if there are no windows to display.
> Actually the function will never be called since emptyLayout is used
> instead of doLayout when there are no windows to display. All this
> results in that ReleaseResources is not sent to the underlying
> layouts. I fixed it by introducing emptyLayout but it is also possible
> to do it by using runLayout instead, but this seem cleaner.
> /Anders Engström
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: combo-releaseresources-newfix.dpatch
Type: application/octet-stream
Size: 28510 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090224/cf5f868f/combo-releaseresources-newfix-0001.obj


More information about the xmonad mailing list