aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-06-05 11:18:03 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-06-05 11:18:03 +0200
commita56cc7e941ef4eefaf4e288190cf16d5cb340c3e (patch)
treebbd7a72448ffe031749c8022b41368b27211c97a
parentf5ade6577d9aba17ebf9bcb7a09ba178541e5f29 (diff)
downloadxmonad-a56cc7e941ef4eefaf4e288190cf16d5cb340c3e.tar.gz
xmonad-a56cc7e941ef4eefaf4e288190cf16d5cb340c3e.tar.xz
xmonad-a56cc7e941ef4eefaf4e288190cf16d5cb340c3e.zip
comments only
darcs-hash:20070605091803-9c5c1-4f975ef36d67e93ebdc2f0c4345898a3eccc686e.gz
-rw-r--r--Operations.hs28
1 files changed, 5 insertions, 23 deletions
diff --git a/Operations.hs b/Operations.hs
index 54a89f2..cb17ec0 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -447,15 +447,8 @@ float w = withDisplay $ \d -> do
(fi (wa_height wa + bw*2) % fi (rect_height sc)))
where fi x = fromIntegral x
--- | Toggle floating bit
---
--- TODO not useful unless we remember the original size
---
--- toggleFloating :: Window -> X ()
--- toggleFloating w = gets windowset >>= \ws -> if M.member w (W.floating ws) then sink w else float w
-
-------------------------------------------------------------------------
--- mouse handling
+-- ---------------------------------------------------------------------
+-- Mouse handling
-- | Accumulate mouse motion events
mouseDrag :: (XMotionEvent -> IO ()) -> X ()
@@ -487,20 +480,9 @@ mouseResizeWindow w = withDisplay $ \d -> do
io $ warpPointer d none w 0 0 0 0 (fromIntegral (wa_width wa)) (fromIntegral (wa_height wa))
mouseDrag $ \(_, _, _, ex, ey, _, _, _, _, _) ->
resizeWindow d w `uncurry`
- applySizeHints sh ((fromIntegral (max 1 (ex - fromIntegral (wa_x wa)))),
- (fromIntegral (max 1 (ey - fromIntegral (wa_y wa)))))
+ applySizeHints sh ((fromIntegral (max 1 (ex - fromIntegral (wa_x wa)))),
+ (fromIntegral (max 1 (ey - fromIntegral (wa_y wa)))))
float w
---
-
--- generic handler, but too complex:
---
--- mouseModifyWindow f g w = withDisplay $ \d -> do
--- io $ raiseWindow d w
--- wa <- io $ getWindowAttributes d w
--- x <- f d w wa
--- mouseDrag $ \(_,_,_,ex,ey,_,_,_,_,_) -> g x ex ey d w wa
--- float w
-
-- ---------------------------------------------------------------------
-- | Support for window size hints
@@ -514,7 +496,7 @@ applySizeHints sh =
. maybe id (\(bw, bh) (w, h) -> (w+bw, h+bh)) (sh_base_size sh)
. maybe id applyResizeIncHint (sh_resize_inc sh)
. maybe id applyAspectHint (sh_aspect sh)
- . maybe id (\(bw,bh) (w,h) -> (w-bw, h-bh)) (sh_base_size sh) -- TODO
+ . maybe id (\(bw,bh) (w,h) -> (w-bw, h-bh)) (sh_base_size sh)
-- | Reduce the dimensions so their aspect ratio falls between the two given aspect ratios.
applyAspectHint :: (D, D) -> D -> D