aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitri Iouchtchenko <johnnyspoon@gmail.com>2013-01-21 07:13:24 +0100
committerDmitri Iouchtchenko <johnnyspoon@gmail.com>2013-01-21 07:13:24 +0100
commitccec28ce8b5c44fcc39bd647acc7d506ac7e22d2 (patch)
treece6c21ad541d3b62f417a1aa669558b9b2105f79
parent5566b2bf2fa6fba2fc3709db663b4ea1353086f3 (diff)
downloadXMonadContrib-ccec28ce8b5c44fcc39bd647acc7d506ac7e22d2.tar.gz
XMonadContrib-ccec28ce8b5c44fcc39bd647acc7d506ac7e22d2.tar.xz
XMonadContrib-ccec28ce8b5c44fcc39bd647acc7d506ac7e22d2.zip
Give a name to the initial state in X.A.GridSelect
Ignore-this: 989ae20ccc3d5b1392f0694d5c62e759 darcs-hash:20130121061324-7d114-34eccd0ee4c75b38d6203f4a2ee083cbdeab110e.gz
-rw-r--r--XMonad/Actions/GridSelect.hs28
1 files changed, 14 insertions, 14 deletions
diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs
index 1543644..bb392d9 100644
--- a/XMonad/Actions/GridSelect.hs
+++ b/XMonad/Actions/GridSelect.hs
@@ -628,16 +628,16 @@ gridselect _ [] = return Nothing
gridselect gsconfig elements =
withDisplay $ \dpy -> do
rootw <- asks theRoot
- s <- gets $ screenRect . W.screenDetail . W.current . windowset
+ scr <- gets $ screenRect . W.screenDetail . W.current . windowset
win <- liftIO $ mkUnmanagedWindow dpy (defaultScreenOfDisplay dpy) rootw
- (rect_x s) (rect_y s) (rect_width s) (rect_height s)
+ (rect_x scr) (rect_y scr) (rect_width scr) (rect_height scr)
liftIO $ mapWindow dpy win
liftIO $ selectInput dpy win (exposureMask .|. keyPressMask .|. buttonReleaseMask)
status <- io $ grabKeyboard dpy win True grabModeAsync grabModeAsync currentTime
io $ grabButton dpy button1 anyModifier win True buttonReleaseMask grabModeAsync grabModeAsync none none
font <- initXMF (gs_font gsconfig)
- let screenWidth = toInteger $ rect_width s;
- screenHeight = toInteger $ rect_height s;
+ let screenWidth = toInteger $ rect_width scr
+ screenHeight = toInteger $ rect_height scr
selectedElement <- if (status == grabSuccess) then do
let restriction ss cs = (fromInteger ss/fromInteger (cs gsconfig)-1)/2 :: Double
restrictX = floor $ restriction screenWidth gs_cellwidth
@@ -645,16 +645,16 @@ gridselect gsconfig elements =
originPosX = floor $ ((gs_originFractX gsconfig) - (1/2)) * 2 * fromIntegral restrictX
originPosY = floor $ ((gs_originFractY gsconfig) - (1/2)) * 2 * fromIntegral restrictY
coords = diamondRestrict restrictX restrictY originPosX originPosY
-
- evalTwoD (updateAllElements >> (gs_navigate gsconfig)) TwoDState { td_curpos = (head coords),
- td_availSlots = coords,
- td_elements = elements,
- td_gsconfig = gsconfig,
- td_font = font,
- td_paneX = screenWidth,
- td_paneY = screenHeight,
- td_drawingWin = win,
- td_searchString = "" }
+ s = TwoDState { td_curpos = (head coords),
+ td_availSlots = coords,
+ td_elements = elements,
+ td_gsconfig = gsconfig,
+ td_font = font,
+ td_paneX = screenWidth,
+ td_paneY = screenHeight,
+ td_drawingWin = win,
+ td_searchString = "" }
+ evalTwoD (updateAllElements >> (gs_navigate gsconfig)) s
else
return Nothing
liftIO $ do