summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Main.hs b/Main.hs
index ea6d96b..359278b 100644
--- a/Main.hs
+++ b/Main.hs
@@ -26,7 +26,7 @@ import Graphics.X11.Xinerama (getScreenInfo)
import XMonad
import Config
import StackSet (new)
-import Operations (manage, unmanage, focus, setFocusX, full, isClient)
+import Operations (manage, unmanage, focus, setFocusX, full, isClient, rescreen)
--
-- The main entry point
@@ -70,7 +70,7 @@ main = do
-- setup initial X environment
sync dpy False
selectInput dpy rootw $ substructureRedirectMask .|. substructureNotifyMask
- .|. enterWindowMask .|. leaveWindowMask
+ .|. enterWindowMask .|. leaveWindowMask .|. structureNotifyMask
grabKeys dpy rootw
sync dpy False
@@ -171,4 +171,9 @@ handle e@(ConfigureRequestEvent {}) = withDisplay $ \dpy -> do
, wc_stack_mode = fromIntegral $ ev_detail e }
io $ sync dpy False
+-- the root may have configured
+handle e@(ConfigureEvent {ev_window = w}) = do
+ r <- asks theRoot
+ when (r == w) rescreen
+
handle _ = return () -- trace (eventName e) -- ignoring