aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-06-04 05:56:37 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-06-04 05:56:37 +0200
commit54d3c8e2d69754671ea9196384122d0202aa7a47 (patch)
treefa25563a00182abee8c050b67fbc60302907a942
parent32d280b9fc4f5703a2c9516d22cf088840e22a96 (diff)
downloadxmonad-54d3c8e2d69754671ea9196384122d0202aa7a47.tar.gz
xmonad-54d3c8e2d69754671ea9196384122d0202aa7a47.tar.xz
xmonad-54d3c8e2d69754671ea9196384122d0202aa7a47.zip
clean up Main.hs slightly
darcs-hash:20070604035637-9c5c1-a5be67b987c402fe384f7a3c5c3443aabdf62885.gz
-rw-r--r--Main.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/Main.hs b/Main.hs
index 04591ae..1575fa5 100644
--- a/Main.hs
+++ b/Main.hs
@@ -157,14 +157,13 @@ handle e@(MappingNotifyEvent {ev_window = w}) = do
when (ev_request e == mappingKeyboard) $ withDisplay $ io . flip grabKeys w
-- click on an unfocused window, makes it focused on this workspace
-handle (ButtonEvent { ev_window = w, ev_subwindow = subw, ev_event_type = t, ev_state = m, ev_button = b })
- | t == buttonPress = do isr <- isRoot w
- -- If it's the root window, then it's something we
- -- grabbed in grabButtons. Otherwise, it's
- -- click-to-focus.
- if isr
- then whenJust (M.lookup (cleanMask m, b) mouseBindings) ($ subw)
- else focus w
+handle e@(ButtonEvent {ev_window = w,ev_event_type = t,ev_button = b })
+ | t == buttonPress = do
+ isr <- isRoot w
+ if isr then whenJust (M.lookup (cleanMask (ev_state e), b) mouseBindings) ($ ev_subwindow e)
+ else focus w
+ -- If it's the root window, then it's something we
+ -- grabbed in grabButtons. Otherwise, it's click-to-focus.
-- entered a normal window, makes this focused.
handle e@(CrossingEvent {ev_window = w, ev_event_type = t})
@@ -195,7 +194,8 @@ handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
else io $ allocaXEvent $ \ev -> do
setEventType ev configureNotify
setConfigureEvent ev w w
- (wa_x wa) (wa_y wa) (wa_width wa) (wa_height wa) (ev_border_width e) none (wa_override_redirect wa)
+ (wa_x wa) (wa_y wa) (wa_width wa)
+ (wa_height wa) (ev_border_width e) none (wa_override_redirect wa)
sendEvent dpy w False 0 ev
io $ sync dpy False