summaryrefslogtreecommitdiffstats
path: root/XMonad/Main.hsc
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Main.hsc')
-rw-r--r--XMonad/Main.hsc12
1 files changed, 4 insertions, 8 deletions
diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc
index ed904ac..706c5a0 100644
--- a/XMonad/Main.hsc
+++ b/XMonad/Main.hsc
@@ -275,7 +275,6 @@ handle e@(CrossingEvent {ev_event_type = t})
-- configure a window
handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
ws <- gets windowset
- wa <- io $ getWindowAttributes dpy w
if not (member w ws)
then do io $ configureWindow dpy w (ev_value_mask e) $ WindowChanges
@@ -286,12 +285,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 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)
- sendEvent dpy w False 0 ev
+ else configureClientWindow w
io $ sync dpy False
-- configuration changes in the root may mean display settings have changed
@@ -315,14 +309,16 @@ reparent :: Window -> X ()
reparent w = withDisplay $ \dpy -> do
rootw <- asks theRoot
p <- asks normalBorder
+ fMask <- asks (frameMask . config)
noFrame <- getsWindowState ((==none) . wsFrame) w
when noFrame $ do
trace $ "reparent: " ++ show w
frame <- io $ allocaSetWindowAttributes $ \swa -> do
set_background_pixel swa p
set_border_pixel swa p
+ set_event_mask swa fMask
set_override_redirect swa True
- createWindow dpy rootw (-1) (-1) 1 1 0 copyFromParent inputOutput (Visual nullPtr) (cWBackPixel.|.cWBorderPixel.|.cWOverrideRedirect) swa
+ createWindow dpy rootw (-1) (-1) 1 1 0 copyFromParent inputOutput (Visual nullPtr) (cWBackPixel.|.cWBorderPixel.|.cWEventMask.|.cWOverrideRedirect) swa
io $ do
unmapWindow dpy w
addToSaveSet dpy w