diff options
author | Roman Cheplyaka <roma@ro-che.info> | 2008-11-11 07:33:48 +0100 |
---|---|---|
committer | Roman Cheplyaka <roma@ro-che.info> | 2008-11-11 07:33:48 +0100 |
commit | a3b81802320d6452a78c138be00e97d078adfa45 (patch) | |
tree | 249a9257d46f0e603ef58bbc490d9e6667a9eb12 | |
parent | 9300fcdeced8eacd6eca4c4e2ffc31bd977e3aee (diff) | |
download | XMonadContrib-a3b81802320d6452a78c138be00e97d078adfa45.tar.gz XMonadContrib-a3b81802320d6452a78c138be00e97d078adfa45.tar.xz XMonadContrib-a3b81802320d6452a78c138be00e97d078adfa45.zip |
GridSelect: force cursor stay in visible area
darcs-hash:20081111063348-3ebed-734bfca5f5207d2da0cfaf98e67d2fe959bfcb97.gz
-rw-r--r-- | XMonad/Actions/GridSelect.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs index 5d8307d..59e7172 100644 --- a/XMonad/Actions/GridSelect.hs +++ b/XMonad/Actions/GridSelect.hs @@ -154,9 +154,11 @@ handle d win (ks,_) (KeyEvent {ev_event_type = t}) (TwoDState pos win' _ _ _ _) <- get return $ fmap (snd . snd) $ find ((== pos) . fst) win' where diffAndRefresh diff = do - (TwoDState pos windowlist gsconfig font paneX paneY) <- get - put $ TwoDState (pos `tupadd` diff) windowlist gsconfig font paneX paneY - updateWindows d win + (TwoDState pos windowmap gsconfig font paneX paneY) <- get + let newpos = pos `tupadd` diff + when (isJust $ find ((newpos ==).fst) windowmap) $ do + put $ TwoDState newpos windowmap gsconfig font paneX paneY + updateWindows d win eventLoop d win handle d win _ _ = do |