summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-07-05 21:52:13 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-07-05 21:52:13 +0200
commita20246fbd5e3d0b16b7d15d4a7cd098fb7e15e71 (patch)
tree7b9c4d5156491133c0dd2e6ddf51090da4e44df8 /Main.hs
parentbfd25c05b11c0e2481f25b333c99f09eca36a1e0 (diff)
downloadmetatile-a20246fbd5e3d0b16b7d15d4a7cd098fb7e15e71.tar
metatile-a20246fbd5e3d0b16b7d15d4a7cd098fb7e15e71.zip
Note and workaround bugs in Operations.float
darcs-hash:20070705195213-a5988-2dd794ce7f294a43fd21d88ec7974679de60afb7
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Main.hs b/Main.hs
index 7b7ac7c..efa7ab1 100644
--- a/Main.hs
+++ b/Main.hs
@@ -29,7 +29,7 @@ import Graphics.X11.Xinerama (getScreenInfo)
import XMonad
import Config
-import StackSet (new, floating, member)
+import StackSet (new, floating, member, findIndex, workspace, tag, current, visible)
import qualified StackSet as W
import Operations
@@ -209,7 +209,11 @@ handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
ws <- gets windowset
wa <- io $ getWindowAttributes dpy w
- if M.member w (floating ws) || not (member w ws)
+ -- TODO temporary workaround for some bugs in float. Don't call 'float' on
+ -- windows that aren't visible, because it changes the focused screen
+ let vis = any ((== findIndex w ws) . Just . tag . workspace) (current ws : visible ws)
+ if (M.member w (floating ws) && vis)
+ || not (member w ws)
then do io $ configureWindow dpy w (ev_value_mask e) $ WindowChanges
{ wc_x = ev_x e
, wc_y = ev_y e