BurntSushi / wingo

A fully-featured window manager written in Go.
Do What The F*ck You Want To Public License
1k stars 90 forks source link

cloned displays; choose the larger resolution #34

Open BurntSushi opened 12 years ago

BurntSushi commented 12 years ago

When detecting displays, if two displays are cloned, then they will have the same point of origin—usually (0, 0). When that happens, Wingo picks one of them (the first one reported), and operates as if there is only one display.

If the cloned displays have the same resolution, it doesn't matter which one we choose.

However, if the cloned displays have differing resolutions, this can lead to weird behaviors. For example, if the smaller resolution is used, then tiling will look OK on the small monitor, but on the big monitor the space will be constrained and tiling won't use all space available.

Conversely, if the larger resolution is used, then a tiling layout will end up with "over hanging" windows on the smaller screen (which makes parts of them invisible).

I believe that the current behavior is wrong, as we are choosing the resolution arbitrarily. I think we should pick one of the above behaviors and stick to it. But which one?

I lean toward always choosing the smaller resolution, since this ensures that windows are always visible.

I could make this a configuration option, but it seems like an odd thing to do.

BurntSushi commented 12 years ago

Example xinerama output:

[22:38] <frobnitz> Number of heads: 2
[22:38] <frobnitz> 0 :: X: 0, Y: 0, Width: 1366, Height: 768
[22:38] <frobnitz> 1 :: X: 0, Y: 0, Width: 1920, Height: 1080