Drop supported_types parameter in Window::windowType()

It's unused mostly.
remotes/origin/work/zamundaaa/output-lifetime
Vlad Zahorodnii 3 years ago
parent 902c2feb12
commit 08bebd1c4a
  1. 2
      src/inputpanelv1window.cpp
  2. 2
      src/inputpanelv1window.h
  3. 2
      src/internalwindow.cpp
  4. 2
      src/internalwindow.h
  5. 2
      src/layershellv1window.cpp
  6. 2
      src/layershellv1window.h
  7. 9
      src/unmanaged.cpp
  8. 2
      src/unmanaged.h
  9. 3
      src/window.h
  10. 8
      src/x11window.cpp
  11. 2
      src/x11window.h
  12. 2
      src/xdgshellwindow.cpp
  13. 2
      src/xdgshellwindow.h

@ -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;
}

@ -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

@ -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;
}

@ -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;

@ -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;
}

@ -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;

@ -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

@ -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;

@ -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;

@ -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;
}

@ -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);

@ -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;
}

@ -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;

Loading…
Cancel
Save