[Xmonad] darcs patch: make workspace tag not need to be a Num.

David Roundy droundy at darcs.net
Thu Jun 14 10:18:57 EDT 2007


On Wed, Jun 13, 2007 at 10:40:14PM -0600, Jason Creighton wrote:
> Hmm. Consider: Suppose you have some windows on screen 1, and you hide that
> workspace. Later, you make that workspace visible on a different scren. Now to
> position the floating windows correctly, you have to check if they are on a
> different screen, and if they are, translate their coordinates to the current
> screen. Remember that screens can be different sizes.
> 
> Moving between workspaces would be fairly easy: You could just move them there
> in the StackSet, and then it would get moved on the screen on "refresh".
> 
> You would need to always be able to figure out which screen a window was on:
> What would you do if the upper-left corner of the window got moved off the
> screen? Just not allow it? You could end up with some weird states if you
> weren't careful. (Not that the current code is any better: You can "lose"
> windows by dragging them across screens because xmonad still thinks they're on
> the same workspace, so they get drawn under the tiled windows of the other
> workspace)
> 
> It seems workable, but I have doubts as to whether it's actually better.

The current code seems rather flawed also:  it doesn't preserve window size
or aspect ratio when float windows move between screens.  The window will
still be visible, but I'd say that preservation of window dimensions is a
good idea.  The point of the floating layer seems to be to deal with
windows that for one reason or another don't behave well when scaled to
different dimensions.

Why not just translate floating windows by the upper-left corner of their
current screen when they're hidden? Then we'd preserve their aspect-ratio
and position as absolute coordinates, which is what I would want myself (if
I had more than one screen).  You might not be able to see them on a
smaller screen, but you could always move them back to the original screen
(or put them into tiled mode temporarily?).  Or we could have a
special-case check that we don't show floating windows without putting them
so they're somehow visible.
-- 
David Roundy
http://www.darcs.net


More information about the Xmonad mailing list