summaryrefslogtreecommitdiffstats
path: root/MetaTile/Main.hsc
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-09-17 05:32:29 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-09-17 05:32:29 +0200
commitf3b1977043a8736ac856d4477b485ee441a4342f (patch)
tree7c1aed57bcc08b37b1c4e4ec6233528ae35e6fd3 /MetaTile/Main.hsc
parent7754569f8978dff5c7f6304295cafa487c42d318 (diff)
downloadmetatile-f3b1977043a8736ac856d4477b485ee441a4342f.tar
metatile-f3b1977043a8736ac856d4477b485ee441a4342f.zip
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.
Diffstat (limited to 'MetaTile/Main.hsc')
-rw-r--r--MetaTile/Main.hsc6
1 files changed, 2 insertions, 4 deletions
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