Skip to content

Conversation

@LlinksRechts
Copy link
Contributor

This PR contains fixes for dual screen mode (-d switch), as mentioned in #19 :

  • Calculating offset correctly (used to be based on the current screen of the window, but should be absolute in dual screen mode)
  • Calculating all two corners instead of just one instead of just adding an offset, in case the corners are on different monitors
  • Moved width/height calculation to the end where absolute positions are available (again for proper offsets between screens)

Now, when a window is moved "between" two screens (one corner on one screen, the other one on another screen), the two tiles on either screen are calculated like in single screen mode each, and the calculated geometry of the window is the smallest enclosing rectangle of the two tiles. Note that this may result in parts of the window being outside of the screen if the screens are misaligned or of different sizes.

Tested with the following configurations:

  • single screen
  • Two equally sized screens
    • aligned side by side
    • misaligned horizontally
    • misaligned vertically
  • Two differently sized screens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant