codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

bug @ XMonad.Operations floatLocation #572

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. trying to use XMonad.Operations floatLocation and dependents like: float...

What is the expected output?
float location should query the window and not the XConfig for the border width.

What do you see instead?
floatLocation uses border width from the XConfig instead of the window.
this conflicts with NoBorders when borders are toggled.

What version of the product are you using?
the one that come with my distro.

On what operating system?
debian wheezy.

Are you using an xmonad.hs?
yap.

Please attach it and the output of "xmonad --recompile".
compiles fine, works bad.

Please provide any additional information below.
--
-- such as the bug correction...
--
-- | Given a window, find the screen it is located on, and compute
-- the geometry of that window wrt. that screen.
floatLocation :: Window -> X (ScreenId, W.RationalRect)
floatLocation w = withDisplay $ \d -> do
    ws <- gets windowset
    wa <- io $ getWindowAttributes d w
    -- bw <- fi <$> asks (borderWidth . config) -- abc
    sc <- fromMaybe (W.current ws) <$> pointScreen (fi $ wa_x wa) (fi $ wa_y wa)

    let sr = screenRect . W.screenDetail $ sc
        rr = W.RationalRect ((fi (wa_x wa) - fi (rect_x sr)) % fi (rect_width sr))
                            ((fi (wa_y wa) - fi (rect_y sr)) % fi (rect_height sr))
                            (fi (wa_width  wa + bw*2) % fi (rect_width sr))
                            (fi (wa_height wa + bw*2) % fi (rect_height sr))
        bw = wa_border_width wa -- abc

    return (W.screen sc, rr)
  where fi x = fromIntegral x

Original issue reported on code.google.com by rui.da...@gmail.com on 30 May 2014 at 10:10

GoogleCodeExporter commented 8 years ago
flea location...

  http://xmonad.org/xmonad-docs/xmonad/src/XMonad-Operations.html#floatLocation

Original comment by rui.da...@gmail.com on 30 May 2014 at 10:12

GoogleCodeExporter commented 8 years ago
... notice that is possible that other functions have the same problem...

Original comment by rui.da...@gmail.com on 31 May 2014 at 1:31