[xmonad] proposal: add extra screen parameter to runLayout

Brent Yorgey byorgey at gmail.com
Wed Mar 26 12:02:46 EDT 2008


On Wed, Mar 26, 2008 at 11:32 AM, David Roundy <droundy at darcs.net> wrote:

> On Wed, Mar 26, 2008 at 11:25:32AM -0400, Brent Yorgey wrote:
> > On Wed, Mar 26, 2008 at 10:51 AM, David Roundy <droundy at darcs.net>
> wrote:
> > > Why not just check the rectangle against the screen rectangle? That
> sounds
> > > simpler and safer to me.
> >
> > I'm not sure that I follow.  Are different screens guaranteed to have
> > different rectangles?
>
> If they don't have different rectangles, then they are displaying the same
> contents.  A window isn't located on a "screen", it's located at a
> coordinate in an abstract space.  If a point is in a screen rectangle then
> it's visible on that screen.  If it's in multiple screen rectangles, then
> multiple screens are displaying it (which would be the case if you're
> mirroring content... I imagine xinerama can do this).  So if two screens
> *do* have the same rectangle, then they ought to have the same gap (and
> really should hold the same workspace).


Aha!  Thanks, David!  I did not understand before that the coordinates of
window and screen rectangles are relative to an absolute coordinate system
*that extends over all screens*.  I.e. I thought that each screen had its
own separate coordinate system.

Great, I'm really glad I sent a message to the list about this first!
David's suggested approach of matching screen rectangles will work great, no
need to go making modifications to the LayoutClass again.  Gaps in contrib,
coming soon! =)

Perhaps I will even write a PerScreen extension module that will allow you
to easily apply various layouts or modifiers on a per-screen basis, so Lee
can easily have Reflected layouts on the left screen, and so on. But I
probably won't get that done before 0.7.

-Brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/xmonad/attachments/20080326/2712e220/attachment.htm


More information about the xmonad mailing list