[Xmonad] darcs patch: make NewTabbed use InvisibleMaybe to hid... (and 3 more)

David Roundy droundy at darcs.net
Thu Sep 27 22:08:22 EDT 2007


On Fri, Sep 28, 2007 at 03:19:29AM +0200, Andrea Rossato wrote:
> I'm sending them all. The last one fixes a bug in NewTabbed.

...

> hunk ./NewTabbed.hs 94
>      TabState { tabsWindows :: [(Window,Window)]
>               , scr         :: Rectangle
>               , fontS       :: FontStruct -- FontSet
> -    }
> +    } deriving ( Show , Read )

Any reason to add this deriving back in? I liked having it removed, so that
we couldn't accidentally print it, and to make it clear that we don't
intend to do so.

>  data Tabbed a = 
>      Tabbed (InvisibleMaybe TabState) TConf
> hunk ./NewTabbed.hs 140
>      | Just ReleaseResources == fromMessage m = do d <- asks display
>                                                    destroyTabs $ map fst tws
>                                                    io $ freeFont d (fontS st)
> -                                                  return $ Just $ Tabbed INothin conf
> +                                                  return Nothing
>  handleMess _ _  = return Nothing
>  

I don't understand the bug that this supposedly fixes, but I'd say it
introduces a bug, not the other way around.  With this change, we retain
references to resources that have been freed, which is definitely not a
good thing.
-- 
David Roundy
Department of Physics
Oregon State University


More information about the Xmonad mailing list