From 4a362ca697eef3e390cf6e2dd1fdcf1133f3cbf3 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Wed, 15 Aug 2007 05:26:19 +0200 Subject: Make FlexibleManipulate comply with new mouse dragging system darcs-hash:20070815032619-a5988-a90444c385bbc5e0cc75847368fc5ac1a7bb5990.gz --- FlexibleManipulate.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'FlexibleManipulate.hs') 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 -- cgit v1.2.3