From 1717de8a59cb3a553a95507ee2d147990180a126 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 1 Sep 2021 12:27:50 +0300 Subject: [PATCH] Port XdgToplevelClient::updateShowOnScreenEdge() to AbstractOutput --- src/xdgshellclient.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp index a17755922b..2f5e8bac94 100644 --- a/src/xdgshellclient.cpp +++ b/src/xdgshellclient.cpp @@ -14,7 +14,6 @@ #include "deleted.h" #include "platform.h" #include "screenedge.h" -#include "screens.h" #include "subsurfacemonitor.h" #include "virtualdesktops.h" #include "wayland_server.h" @@ -1450,8 +1449,10 @@ void XdgToplevelClient::updateShowOnScreenEdge() // Screen edge API requires an edge, thus we need to figure out which edge the window borders. const QRect clientGeometry = frameGeometry(); Qt::Edges edges; - for (int i = 0; i < screens()->count(); i++) { - const QRect screenGeometry = screens()->geometry(i); + + const auto outputs = kwinApp()->platform()->enabledOutputs(); + for (const AbstractOutput *output : outputs) { + const QRect screenGeometry = output->geometry(); if (screenGeometry.left() == clientGeometry.left()) { edges |= Qt::LeftEdge; }