[Xmonad] darcs patch: DragPane.hs: fixes usage info (requires ...
(and 2 more)
David Roundy
daveroundy at gmail.com
Mon Aug 27 11:10:08 EDT 2007
On Mon, Aug 27, 2007 at 04:55:29PM +0200, Andrea Rossato wrote:
> hunk ./DragPane.hs 51
> dragPane :: String -> Double -> Double -> Layout a
> dragPane ident delta split = Layout { doLayout = dolay, modifyLayout = return . message }
> where
> - dolay r s = do handlec <- withDisplay $ \dpy -> io $ initColor dpy handleColor
> + dolay r s = do handlec <- withDisplay $ \dpy -> io $ initColor dpy ident
> root <- asks theRoot
> let (left', right') = splitHorizontallyBy split r
> leftmost = fromIntegral $ case r of Rectangle x _ _ _ -> x
Ah, there's a bit of a problem here, which is that ident is intended to be
a unique identifier for each dragPane, particularly when you've got more
than one dragPane in a Combo layout (otherwise signals will get crossed).
Ideally this would be done automagically (e.g. a self-modifying layout
could generate its own random identity and then use that for sending
signals to itself), which eventually (if I get back to hacking on DragPane
and/or when I get a screen large enough to hold more than three useful
panes [one a small clock pane]) I plan on implementing.
We could also implement (which would be nice) and XMonadContrib module that
generates unique integers, e.g.
uniqueInt :: X Int
which would probably need to use the unsafePerformIO/NOINLINE trick, alas.
Or it could just gamble using a random number generator (which isn't a bad
idea, as long as uniqueness isn't required for safety).
--
David Roundy
http://www.darcs.net
More information about the Xmonad
mailing list