It happens with gcolor2 (gtk), and the same thing happens with the windows
created by OCaml graphics library (it creates windows by calling X
directly, without toolkits), but I haven't seen the issues with KDE
applications, though I don't know any similar adequate applications.
The afterwards-created floating dialog windows (various preference windows,
help-abouts etc I just tried looking at) seem to be correct both in KDE and
I think the problem is that xmonad internally represents window dimensions
as fractions of screen size, and these are computed from the initial window
position and size. So, if an application creates a new window at (0,0) and
then asks the window manager to position it, xmonad computes the size as a
fraction relative to the screen containing (0,0) and then places the window
on whatever screen is currently active. If the size of this screen is
different, so is the size of the placed window.
This chunk of code in XMonad.Operations is the buggy code:
-- Window manager operations
-- manage. Add a new window to be managed in the current workspace.
-- Bring it into focus.
-- Whether the window is already managed, or not, it is mapped, has its
-- border set, and its event mask set.
manage :: Window -> X ()
manage w = whenX (not <$> isClient w) $ withDisplay $ \d -> do
sh <- io $ getWMNormalHints d w
let isFixedSize = sh_min_size sh /= Nothing && sh_min_size sh ==
isTransient <- isJust <$> io (getTransientForHint d w)
rr <- snd `fmap` floatLocation w
-- ensure that float windows don't go over the edge of the screen
let adjust (W.RationalRect x y wid h) | x + wid > 1 || y + h > 1 || x <
0 || y < 0
= W.RationalRect (0.5 -
wid/2) (0.5 - h/2) wid h
adjust r = r
f ws | isFixedSize || isTransient = W.float w (adjust rr) .
W.insertUp w . W.view i $ ws
| otherwise = W.insertUp w ws
where i = W.tag $ W.workspace $ W.current ws
mh <- asks (manageHook . config)
g <- appEndo <$> userCodeDef (Endo id) (runQuery mh w)
windows (g . f)
Notice the floatLocation query throws out the recommended screen for the
float to be placed on.
I don't actually know what the right version of this code is.
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at: