diff --git a/src/inputpanelv1window.cpp b/src/inputpanelv1window.cpp index fafb32a2d9..1110faaa49 100644 --- a/src/inputpanelv1window.cpp +++ b/src/inputpanelv1window.cpp @@ -165,7 +165,7 @@ void InputPanelV1Window::destroyWindow() unref(); } -NET::WindowType InputPanelV1Window::windowType(bool, int) const +NET::WindowType InputPanelV1Window::windowType(bool direct) const { return NET::Utility; } diff --git a/src/inputpanelv1window.h b/src/inputpanelv1window.h index 54d013f697..65a6af3cc8 100644 --- a/src/inputpanelv1window.h +++ b/src/inputpanelv1window.h @@ -70,7 +70,7 @@ public: { return true; } - NET::WindowType windowType(bool /*direct*/, int /*supported_types*/) const override; + NET::WindowType windowType(bool direct = false) const override; QRectF inputGeometry() const override; Mode mode() const diff --git a/src/internalwindow.cpp b/src/internalwindow.cpp index c7d811d364..63e41e3b9d 100644 --- a/src/internalwindow.cpp +++ b/src/internalwindow.cpp @@ -154,7 +154,7 @@ QSizeF InternalWindow::maxSize() const return m_handle->maximumSize(); } -NET::WindowType InternalWindow::windowType(bool direct, int supported_types) const +NET::WindowType InternalWindow::windowType(bool direct) const { return m_windowType; } diff --git a/src/internalwindow.h b/src/internalwindow.h index a09330f514..e5d92be4d8 100644 --- a/src/internalwindow.h +++ b/src/internalwindow.h @@ -30,7 +30,7 @@ public: QString captionSuffix() const override; QSizeF minSize() const override; QSizeF maxSize() const override; - NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; + NET::WindowType windowType(bool direct = false) const override; void killWindow() override; bool isClient() const override; bool isPopupWindow() const override; diff --git a/src/layershellv1window.cpp b/src/layershellv1window.cpp index 6361df3143..c367375967 100644 --- a/src/layershellv1window.cpp +++ b/src/layershellv1window.cpp @@ -95,7 +95,7 @@ void LayerShellV1Window::scheduleRearrange() m_integration->scheduleRearrange(); } -NET::WindowType LayerShellV1Window::windowType(bool, int) const +NET::WindowType LayerShellV1Window::windowType(bool) const { return m_windowType; } diff --git a/src/layershellv1window.h b/src/layershellv1window.h index 2190946e17..085a9100df 100644 --- a/src/layershellv1window.h +++ b/src/layershellv1window.h @@ -31,7 +31,7 @@ public: KWaylandServer::LayerSurfaceV1Interface *shellSurface() const; Output *desiredOutput() const; - NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; + NET::WindowType windowType(bool direct = false) const override; bool isPlaceable() const override; bool isCloseable() const override; bool isMovable() const override; diff --git a/src/unmanaged.cpp b/src/unmanaged.cpp index f40db727c2..aabd8012f1 100644 --- a/src/unmanaged.cpp +++ b/src/unmanaged.cpp @@ -178,14 +178,9 @@ QStringList Unmanaged::activities() const return QStringList(); } -NET::WindowType Unmanaged::windowType(bool direct, int supportedTypes) const +NET::WindowType Unmanaged::windowType(bool direct) const { - // for unmanaged windows the direct does not make any difference - // as there are no rules to check and no hacks to apply - if (supportedTypes == 0) { - supportedTypes = SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK; - } - return info->windowType(NET::WindowTypes(supportedTypes)); + return info->windowType(SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK); } bool Unmanaged::isOutline() const diff --git a/src/unmanaged.h b/src/unmanaged.h index c22d615a6f..687b945e73 100644 --- a/src/unmanaged.h +++ b/src/unmanaged.h @@ -28,7 +28,7 @@ public: bool hasScheduledRelease() const; static void deleteUnmanaged(Unmanaged *c); QStringList activities() const override; - NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; + NET::WindowType windowType(bool direct = false) const override; bool isOutline() const override; bool isUnmanaged() const override; diff --git a/src/window.h b/src/window.h index 77fbec583b..a542375ce7 100644 --- a/src/window.h +++ b/src/window.h @@ -626,8 +626,7 @@ public: QPointF mapFromLocal(const QPointF &point) const; // prefer isXXX() instead - // 0 for supported types means default for managed/unmanaged types - virtual NET::WindowType windowType(bool direct = false, int supported_types = 0) const = 0; + virtual NET::WindowType windowType(bool direct = false) const = 0; bool hasNETSupport() const; bool isDesktop() const; bool isDock() const; diff --git a/src/x11window.cpp b/src/x11window.cpp index 2e3ee39b51..3bfa96c537 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -2583,13 +2583,9 @@ bool X11Window::isClient() const return true; } -NET::WindowType X11Window::windowType(bool direct, int supportedTypes) const +NET::WindowType X11Window::windowType(bool direct) const { - // TODO: does it make sense to cache the returned window type for SUPPORTED_MANAGED_WINDOW_TYPES_MASK? - if (supportedTypes == 0) { - supportedTypes = SUPPORTED_MANAGED_WINDOW_TYPES_MASK; - } - NET::WindowType wt = info->windowType(NET::WindowTypes(supportedTypes)); + NET::WindowType wt = info->windowType(SUPPORTED_MANAGED_WINDOW_TYPES_MASK); if (direct) { return wt; } diff --git a/src/x11window.h b/src/x11window.h index 47beeeaf4b..6c486660b2 100644 --- a/src/x11window.h +++ b/src/x11window.h @@ -118,7 +118,7 @@ public: } // Inside of geometry() bool windowEvent(xcb_generic_event_t *e); - NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; + NET::WindowType windowType(bool direct = false) const override; bool manage(xcb_window_t w, bool isMapped); void releaseWindow(bool on_shutdown = false); diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index 4fbf55f2c1..277206e5fb 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -91,7 +91,7 @@ XdgSurfaceWindow::~XdgSurfaceWindow() { } -NET::WindowType XdgSurfaceWindow::windowType(bool direct, int supported_types) const +NET::WindowType XdgSurfaceWindow::windowType(bool direct) const { return m_windowType; } diff --git a/src/xdgshellwindow.h b/src/xdgshellwindow.h index 08255c5907..bc12b8a67d 100644 --- a/src/xdgshellwindow.h +++ b/src/xdgshellwindow.h @@ -58,7 +58,7 @@ public: explicit XdgSurfaceWindow(KWaylandServer::XdgSurfaceInterface *shellSurface); ~XdgSurfaceWindow() override; - NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; + NET::WindowType windowType(bool direct = false) const override; QRectF frameRectToBufferRect(const QRectF &rect) const override; QRectF inputGeometry() const override; QMatrix4x4 inputTransformation() const override;