From f3b1977043a8736ac856d4477b485ee441a4342f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 17 Sep 2013 05:32:29 +0200 Subject: Keep track of the current desired frame bounds in the frame state This saved a few round-trips to the X server and is preparation for the window confinement feature. --- MetaTile/Main.hsc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'MetaTile/Main.hsc') diff --git a/MetaTile/Main.hsc b/MetaTile/Main.hsc index 92692a3..f4bf691 100644 --- a/MetaTile/Main.hsc +++ b/MetaTile/Main.hsc @@ -253,8 +253,6 @@ handle e@(ButtonEvent {ev_window = w,ev_event_type = t,ev_button = b }) isr <- isRoot w m <- cleanMask $ ev_state e mact <- asks (M.lookup (m, b) . buttonActions) - trace $ show (ev_subwindow e) - getsFrameState fsWindow (ev_subwindow e) >>= trace . show case mact of Just act | isr -> getsFrameState fsWindow (ev_subwindow e) >>= traverse act >> return () _ -> do @@ -288,7 +286,7 @@ handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do , wc_border_width = 0 , wc_sibling = ev_above e , wc_stack_mode = ev_detail e } - else configureClientWindow w + else configure w io $ sync dpy False -- configuration changes in the root may mean display settings have changed @@ -327,7 +325,7 @@ reparent w = withDisplay $ \dpy -> do addToSaveSet dpy w reparentWindow dpy w frame 0 0 modifyWindowState (\ws -> ws { wsFrame = frame }) w - setFrameState frame $ FrameState { fsWindow = w, fsBorderWidth = BorderWidth 0 0 0 0 } + setFrameState frame $ FrameState { fsWindow = w, fsBounds = Rectangle (-1) (-1) 1 1, fsBorderWidth = BorderWidth 0 0 0 0 } hideParent :: Window -> X () hideParent w = withDisplay $ \dpy -> do -- cgit v1.2.3