Skip to content
Commit b6cd89a8 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Improve Workspace::outputAt()

Workspace::outputAt() casts vectors to four rectangle corners and uses
the shortest one to decide which output is the closest to the given
point.

This works poorly on dual monitor setups where on the left side you have
a monitor with landscape orientation and one with portrait orientation
on the right hand side. In that case, outputAt() will prefer the left
monitor even though the right monitor is the closest one if you cast a
perpendicular from the given point to the right monitor.

In order to improve the handling of that case, this change makes
Workspace::outputAt() compute the closest point to the output geometry
rectangle and use the squared distance as the score.


(cherry picked from commit a9ad59b3)
parent c11eee8c
Pipeline #366203 passed with stage
in 18 minutes and 45 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment