Port screenContainsPos() to AbstractOutput

This commit is contained in:
Vlad Zahorodnii 2021-09-01 12:27:19 +03:00
parent 25a6515e05
commit 26e470b7ff

View file

@ -84,8 +84,9 @@ static Qt::MouseButton buttonToQtMouseButton(uint32_t button)
static bool screenContainsPos(const QPointF &pos)
{
for (int i = 0; i < screens()->count(); ++i) {
if (screens()->geometry(i).contains(pos.toPoint())) {
const auto outputs = kwinApp()->platform()->enabledOutputs();
for (const AbstractOutput *output : outputs) {
if (output->geometry().contains(pos.toPoint())) {
return true;
}
}