From dc826911ecc8689c5b4f6e5f3884acd579f22ca3 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sun, 29 Oct 2023 15:56:24 +0100 Subject: [PATCH] Adapt to KWindowSystem changes --- src/plugins/windowsystem/windowsystem.cpp | 139 +--------------------- src/plugins/windowsystem/windowsystem.h | 34 +----- 2 files changed, 2 insertions(+), 171 deletions(-) diff --git a/src/plugins/windowsystem/windowsystem.cpp b/src/plugins/windowsystem/windowsystem.cpp index 5d165e8e12..a59f057b48 100644 --- a/src/plugins/windowsystem/windowsystem.cpp +++ b/src/plugins/windowsystem/windowsystem.cpp @@ -28,159 +28,22 @@ WindowSystem::WindowSystem() { } -void WindowSystem::activateWindow(WId win, long int time) +void WindowSystem::activateWindow(QWindow *win, long int time) { // KWin cannot activate own windows } -void WindowSystem::forceActiveWindow(WId win, long int time) -{ - // KWin cannot activate own windows -} - -WId WindowSystem::activeWindow() -{ - // KWin internal should not use KWindowSystem to find active window - return 0; -} - -bool WindowSystem::compositingActive() -{ - // wayland is always composited - return true; -} - -void WindowSystem::connectNotify(const QMetaMethod &signal) -{ -} - -QPoint WindowSystem::constrainViewportRelativePosition(const QPoint &pos) -{ - return QPoint(); -} - -int WindowSystem::currentDesktop() -{ - // KWin internal should not use KWindowSystem to find current desktop - return 0; -} - -QString WindowSystem::desktopName(int desktop) -{ - return QString(); -} - -QPixmap WindowSystem::icon(WId win, int width, int height, bool scale, int flags) -{ - return QPixmap(); -} - -bool WindowSystem::mapViewport() -{ - return false; -} - -void WindowSystem::minimizeWindow(WId win) -{ -} - -void WindowSystem::unminimizeWindow(WId win) -{ -} - -int WindowSystem::numberOfDesktops() -{ - // KWin internal should not use KWindowSystem to find number of desktops - return 1; -} - -QString WindowSystem::readNameProperty(WId window, long unsigned int atom) -{ - return QString(); -} - -void WindowSystem::setCurrentDesktop(int desktop) -{ - // KWin internal should not use KWindowSystem to set current desktop -} - -void WindowSystem::setDesktopName(int desktop, const QString &name) -{ - // KWin internal should not use KWindowSystem to set desktop name -} - -void WindowSystem::setExtendedStrut(WId win, int left_width, int left_start, int left_end, int right_width, int right_start, int right_end, int top_width, int top_start, int top_end, int bottom_width, int bottom_start, int bottom_end) -{ -} - -void WindowSystem::setStrut(WId win, int left, int right, int top, int bottom) -{ -} - -void WindowSystem::setOnActivities(WId win, const QStringList &activities) -{ -} - -void WindowSystem::setOnAllDesktops(WId win, bool b) -{ -} - -void WindowSystem::setOnDesktop(WId win, int desktop) -{ -} - void WindowSystem::setShowingDesktop(bool showing) { // KWin should not use KWindowSystem to set showing desktop state } -void WindowSystem::clearState(WId win, NET::States state) -{ - // KWin's windows don't support state -} - -void WindowSystem::setState(WId win, NET::States state) -{ - // KWin's windows don't support state -} - -void WindowSystem::setType(WId win, NET::WindowType windowType) -{ - // KWin's windows don't support types -} - bool WindowSystem::showingDesktop() { // KWin should not use KWindowSystem for showing desktop state return false; } -QList WindowSystem::stackingOrder() -{ - // KWin should not use KWindowSystem for stacking order - return {}; -} - -int WindowSystem::viewportWindowToDesktop(const QRect &r) -{ - return 0; -} - -QList WindowSystem::windows() -{ - return {}; -} - -QRect WindowSystem::workArea(const QList &excludes, int desktop) -{ - return {}; -} - -QRect WindowSystem::workArea(int desktop) -{ - return {}; -} - void WindowSystem::requestToken(QWindow *win, uint32_t serial, const QString &appId) { auto seat = KWin::waylandServer()->seat(); diff --git a/src/plugins/windowsystem/windowsystem.h b/src/plugins/windowsystem/windowsystem.h index dc706b12c4..a355064213 100644 --- a/src/plugins/windowsystem/windowsystem.h +++ b/src/plugins/windowsystem/windowsystem.h @@ -17,41 +17,9 @@ class WindowSystem : public QObject, public KWindowSystemPrivateV2 Q_OBJECT public: WindowSystem(); - QList windows() override; - QList stackingOrder() override; - WId activeWindow() override; - void activateWindow(WId win, long time) override; - void forceActiveWindow(WId win, long time) override; - bool compositingActive() override; - int currentDesktop() override; - int numberOfDesktops() override; - void setCurrentDesktop(int desktop) override; - void setOnAllDesktops(WId win, bool b) override; - void setOnDesktop(WId win, int desktop) override; - void setOnActivities(WId win, const QStringList &activities) override; - QPixmap icon(WId win, int width, int height, bool scale, int flags) override; - void setType(WId win, NET::WindowType windowType) override; - void setState(WId win, NET::States state) override; - void clearState(WId win, NET::States state) override; - void minimizeWindow(WId win) override; - void unminimizeWindow(WId win) override; - QRect workArea(int desktop) override; - QRect workArea(const QList &excludes, int desktop) override; - QString desktopName(int desktop) override; - void setDesktopName(int desktop, const QString &name) override; + void activateWindow(QWindow *win, long time) override; bool showingDesktop() override; void setShowingDesktop(bool showing) override; - void setExtendedStrut(WId win, int left_width, int left_start, int left_end, - int right_width, int right_start, int right_end, int top_width, int top_start, int top_end, - int bottom_width, int bottom_start, int bottom_end) override; - void setStrut(WId win, int left, int right, int top, int bottom) override; - QString readNameProperty(WId window, unsigned long atom) override; - bool mapViewport() override; - int viewportWindowToDesktop(const QRect &r) override; - QPoint constrainViewportRelativePosition(const QPoint &pos) override; - - void connectNotify(const QMetaMethod &signal) override; - void requestToken(QWindow *win, uint32_t serial, const QString &app_id) override; void setCurrentToken(const QString &token) override; quint32 lastInputSerial(QWindow *window) override;