diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-09 04:18:47 +0100 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-09 04:18:47 +0100 |
commit | 2fc1a2624716bfb093c2f49c04db92c30188b5e8 (patch) | |
tree | e4344d7db0381133f63451b18f0c98863849d9a0 | |
parent | 31a0863d89d6934479f64060522b773b09dbb36c (diff) | |
download | metatile-2fc1a2624716bfb093c2f49c04db92c30188b5e8.tar metatile-2fc1a2624716bfb093c2f49c04db92c30188b5e8.zip |
comments
darcs-hash:20070309031847-9c5c1-6396e943c279670afa031449c2b5e54f8595472f
-rw-r--r-- | Main.hs | 29 |
1 files changed, 9 insertions, 20 deletions
@@ -53,7 +53,6 @@ keys = M.fromList $ | i <- [1 .. workspaces] , (f, m) <- [(view, 0), (tag, shiftMask)]] - -- -- let's get underway -- @@ -92,23 +91,21 @@ grabKeys dpy r = forM_ (M.keys keys) $ \(m,s) -> io $ do kc <- keysymToKeycode dpy s grabKey dpy kc m r True grabModeAsync grabModeAsync +-- --------------------------------------------------------------------- +-- Event handler -- -- | handle. Handle X events --- dwm handles: -- --- [ButtonPress] = buttonpress, --- [ConfigureRequest] = configurerequest, --- [DestroyNotify] = destroynotify, --- [EnterNotify] = enternotify, --- [LeaveNotify] = leavenotify, --- [Expose] = expose, --- [KeyPress] = keypress, --- [MappingNotify] = mappingnotify, --- [MapRequest] = maprequest, +-- Events dwm handles that we don't: +-- +-- [ButtonPress] = buttonpress, +-- [EnterNotify] = enternotify, +-- [LeaveNotify] = leavenotify, +-- [Expose] = expose, -- [PropertyNotify] = propertynotify, --- [UnmapNotify] = unmapnotify -- handle :: Event -> W () + handle (MapRequestEvent {window = w}) = withDisplay $ \dpy -> do wa <- io $ getWindowAttributes dpy w when (not (waOverrideRedirect wa)) $ manage w @@ -139,14 +136,6 @@ handle e@(ConfigureRequestEvent {}) = do } io $ sync dpy False --- Typical events I see still unhandled: --- ConfigureNotify --- MapNotify --- CreateNotify --- KeyRelease --- --- In particular, ConfigureNotify and MapNotify a lot on firefox --- handle e = trace (eventName e) -- --------------------------------------------------------------------- |