LemonBoy / bar

A featherweight, lemon-scented, bar based on xcb
MIT License
1.63k stars 194 forks source link

Fix monitor sorting with mix of portrait and landscape layout. #150

Closed neeasade closed 9 years ago

neeasade commented 9 years ago

This PR changes monitor sorting to keep sorting by x and y coordinates, but also takes into account a height comparison that I believe fixes sorting in currently unexpected monitor situations. This is done in a way that keeps current monitor sorting the same on setups with the y offset aligned across the top, so impact should be minimal.

This includes https://github.com/LemonBoy/bar/pull/118

Notes for how I got here and screenshots along the way are attached to https://github.com/LemonBoy/bar/issues/147 (It's unorganized as I commented as I went along) - this was tested in 3 different monitor layouts with different geometry spawns, as seen there.

LemonBoy commented 9 years ago

Looks fine to me and Travis, I didn't double check everything but the = is redundant in one of the two comparisons.

neeasade commented 9 years ago

Ah, you're right - I believe it's the latter, but will test when home today to be safe.

neeasade commented 9 years ago

Removed second =, retested with the three monitor layouts, seems okay to me. Used --amend then repushed.

LemonBoy commented 9 years ago

Aaand merged! Thank you for the PR :)

neeasade commented 9 years ago

np, thank you for the flexible program. :)