aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-08-15 05:26:19 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-08-15 05:26:19 +0200
commit4a362ca697eef3e390cf6e2dd1fdcf1133f3cbf3 (patch)
tree35ee64a5c0f94379bcd0cfe73e511557e27662f6
parenta50cd3c8312bd05e8d03d88c7c886600dd148ef2 (diff)
downloadXMonadContrib-4a362ca697eef3e390cf6e2dd1fdcf1133f3cbf3.tar.gz
XMonadContrib-4a362ca697eef3e390cf6e2dd1fdcf1133f3cbf3.tar.xz
XMonadContrib-4a362ca697eef3e390cf6e2dd1fdcf1133f3cbf3.zip
Make FlexibleManipulate comply with new mouse dragging system
darcs-hash:20070815032619-a5988-a90444c385bbc5e0cc75847368fc5ac1a7bb5990.gz
-rw-r--r--FlexibleManipulate.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/FlexibleManipulate.hs b/FlexibleManipulate.hs
index c16df6a..7daf5e0 100644
--- a/FlexibleManipulate.hs
+++ b/FlexibleManipulate.hs
@@ -71,13 +71,15 @@ mouseWindow f w = whenX (isClient w) $ withDisplay $ \d -> do
mul = mapP (\x -> 2 - 2 * abs(x - 0.5)) fc --Fudge factors: interpolation between 1 when on edge, 2 in middle
atl = ((1, 1) - fc) * mul
abr = fc * mul
- mouseDrag $ \(_, _, _, _, _, ex, ey, _, _, _) -> do
+ mouseDrag (\ex ey -> io $ do
let offset = (fromIntegral ex, fromIntegral ey) - pointer
npos = wpos + offset * atl
nbr = (wpos + wsize) + offset * abr
ntl = minP (nbr - (32, 32)) npos --minimum size
nwidth = applySizeHints sh $ mapP round (nbr - ntl)
moveResizeWindow d w (round $ fst ntl) (round $ snd ntl) `uncurry` nwidth
+ return ())
+ (float w)
float w