diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-04-13 10:37:02 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-04-13 10:37:02 +0200 |
commit | a9d3fd9ebeb64ee0757bd865714e75eabb7e688b (patch) | |
tree | 017a3b4f7c853f5d3b2acb11262417559bc464b5 | |
parent | 9803120e7781fb1990eae4902e45c3a9fbadf40b (diff) | |
download | metatile-a9d3fd9ebeb64ee0757bd865714e75eabb7e688b.tar metatile-a9d3fd9ebeb64ee0757bd865714e75eabb7e688b.zip |
Ignore window entries while moving windows. This should fix all the focus preservation problems.
darcs-hash:20070413083702-a5988-20863eaa042f45a1421a6f171d9a8c42a7854883
-rw-r--r-- | Operations.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Operations.hs b/Operations.hs index ffdaa0a..dcb4710 100644 --- a/Operations.hs +++ b/Operations.hs @@ -51,6 +51,16 @@ refresh = do Wide -> vtile (tileFraction fl) sc $ W.index n ws whenJust (W.peekStack n ws) (io . raiseWindow d) whenJust (W.peek ws) setFocus + clearEnterEvents + +-- | clearEnterEvents. Remove all window entry events from the event queue. +clearEnterEvents :: X () +clearEnterEvents = do + d <- gets display + io $ sync d False + io $ allocaXEvent $ \p -> fix $ \again -> do + more <- checkMaskEvent d enterWindowMask p + when more again -- | tile. Compute the positions for windows in horizontal layout -- mode. @@ -251,6 +261,7 @@ view n = do -- If the old workspace isn't visible anymore, we have to hide the windows -- in case we're switching to an empty workspace. when (m `notElem` (W.visibleWorkspaces ws')) (mapM_ hide (W.index m ws)) + clearEnterEvents setTopFocus -- | 'screenWorkspace sc' returns the workspace number viewed by 'sc'. |