Commit b01b1335 authored by Volker Krause's avatar Volker Krause Committed by Vlad Zahorodnii
Browse files

Remove QDesktopWidget use in WorkspaceWrapper for Qt6

This is basically a continuation of 73973641.
parent 039dd96f
Pipeline #214715 passed with stage
in 13 minutes and 42 seconds
......@@ -20,7 +20,9 @@
#endif
#include <QApplication>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QDesktopWidget>
#endif
namespace KWin
{
......@@ -57,8 +59,9 @@ WorkspaceWrapper::WorkspaceWrapper(QObject *parent)
connect(ws, &Workspace::outputRemoved, this, [this]() {
Q_EMIT numberScreensChanged(numScreens());
});
// TODO Plasma 6: Remove it.
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
connect(QApplication::desktop(), &QDesktopWidget::resized, this, &WorkspaceWrapper::screenResized);
#endif
const QList<Window *> clients = ws->allClientList();
for (Window *client : clients) {
......
......@@ -118,6 +118,7 @@ Q_SIGNALS:
* @param count The new number of screens
*/
void numberScreensChanged(int count);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
/**
* This signal is emitted when the size of @p screen changes.
* Don't forget to fetch an updated client area.
......@@ -125,6 +126,7 @@ Q_SIGNALS:
* @deprecated Use QScreen::geometryChanged signal instead.
*/
void screenResized(int screen);
#endif
/**
* Signal emitted whenever the current activity changed.
* @param id id of the new activity
......
Supports Markdown
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