Fix clamping in screenContainsPos
QRect.contains(somePointF.toPoint()) will round the values. This is problematic for the case of a mouse being at -0.4, we will consider it in bounds for the screen, but obviously this doesn't match any surfaces. The detection and confineToBoundingBox need to behave the same and floor. BUG: 459328
This commit is contained in:
parent
0a22d390d6
commit
e924b1cb23
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,8 @@ static bool screenContainsPos(const QPointF &pos)
|
||||||
{
|
{
|
||||||
const auto outputs = workspace()->outputs();
|
const auto outputs = workspace()->outputs();
|
||||||
for (const Output *output : outputs) {
|
for (const Output *output : outputs) {
|
||||||
if (output->geometry().contains(pos.toPoint())) {
|
if (output->geometry().contains(QPoint(std::floor(pos.x()),
|
||||||
|
std::floor(pos.y())))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue