xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
584 stars 274 forks source link

Actual PerScreen implementation #813

Open geekosaur opened 1 year ago

geekosaur commented 1 year ago

Description

I have implemented an actual PerScreen layout (onScreen and onScreens). The old ifWidth is moved to a new module XMonad.Layout.ByWidth, and re-exported with a deprecation warning pointing to the new module.

I'd like someone who can to test a corner case with respect to rescreen. I think it will usually work, but may glitch if you rapidly plug and unplug an external monitor to which this layout would apply. This can't do more than a brief glitch though, as anything that would trigger it will have another rescreen pending and xmonad will fix itself.

Checklist

geekosaur commented 1 year ago

I squashed it down a bit.

geekosaur commented 1 year ago

In case anyone's wondering, @liskin expressed a concern and plans to review this within the next few days, so don't rush into committing it just yet.

geekosaur commented 1 year ago

I renamed ByWidth.hs to IfWidth.hs for consistency with IfMax.hs and with its ifWidth function, and squashed everything in the process. AFAIK this is just waiting on someone to confirm that I'm handling the Hide and ReleaseResources messages properly.