From a3b81802320d6452a78c138be00e97d078adfa45 Mon Sep 17 00:00:00 2001 From: Roman Cheplyaka Date: Tue, 11 Nov 2008 07:33:48 +0100 Subject: GridSelect: force cursor stay in visible area darcs-hash:20081111063348-3ebed-734bfca5f5207d2da0cfaf98e67d2fe959bfcb97.gz --- XMonad/Actions/GridSelect.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'XMonad/Actions/GridSelect.hs') 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 -- cgit v1.2.3