Unvirtualize some Window properties

This commit is contained in:
Vlad Zahorodnii 2023-03-23 10:54:10 +02:00
parent e31ec802f4
commit 10b5236cfa
3 changed files with 6 additions and 24 deletions

View file

@ -173,26 +173,11 @@ bool Unmanaged::hasScheduledRelease() const
return m_releaseTimer.isActive(); return m_releaseTimer.isActive();
} }
int Unmanaged::desktop() const
{
return NET::OnAllDesktops; // TODO for some window types should be the current desktop?
}
QStringList Unmanaged::activities() const QStringList Unmanaged::activities() const
{ {
return QStringList(); return QStringList();
} }
QVector<VirtualDesktop *> Unmanaged::desktops() const
{
return QVector<VirtualDesktop *>();
}
QPointF Unmanaged::clientPos() const
{
return QPoint(0, 0); // unmanaged windows don't have decorations
}
NET::WindowType Unmanaged::windowType(bool direct, int supportedTypes) const NET::WindowType Unmanaged::windowType(bool direct, int supportedTypes) const
{ {
// for unmanaged windows the direct does not make any difference // for unmanaged windows the direct does not make any difference

View file

@ -27,10 +27,7 @@ public:
bool track(xcb_window_t w); bool track(xcb_window_t w);
bool hasScheduledRelease() const; bool hasScheduledRelease() const;
static void deleteUnmanaged(Unmanaged *c); static void deleteUnmanaged(Unmanaged *c);
int desktop() const override;
QStringList activities() const override; QStringList activities() const override;
QVector<VirtualDesktop *> desktops() const override;
QPointF clientPos() const override;
NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; NET::WindowType windowType(bool direct = false, int supported_types = 0) const override;
bool isOutline() const override; bool isOutline() const override;
bool isUnmanaged() const override; bool isUnmanaged() const override;

View file

@ -606,7 +606,7 @@ public:
bool isOnActiveOutput() const; bool isOnActiveOutput() const;
Output *output() const; Output *output() const;
void setOutput(Output *output); void setOutput(Output *output);
virtual QPointF clientPos() const QPointF clientPos() const
{ {
return QPointF(borderLeft(), borderTop()); return QPointF(borderLeft(), borderTop());
}; // inside of geometry() }; // inside of geometry()
@ -664,8 +664,8 @@ public:
* or NET::OnAllDesktops. Do not use desktop() directly, use * or NET::OnAllDesktops. Do not use desktop() directly, use
* isOnDesktop() instead. * isOnDesktop() instead.
*/ */
virtual int desktop() const; int desktop() const;
virtual QVector<VirtualDesktop *> desktops() const; QVector<VirtualDesktop *> desktops() const;
virtual QStringList activities() const; virtual QStringList activities() const;
bool isOnDesktop(VirtualDesktop *desktop) const; bool isOnDesktop(VirtualDesktop *desktop) const;
bool isOnDesktop(int d) const; bool isOnDesktop(int d) const;
@ -723,7 +723,7 @@ public:
* Whether the Window currently wants the shadow to be rendered. Default * Whether the Window currently wants the shadow to be rendered. Default
* implementation always returns @c true. * implementation always returns @c true.
*/ */
virtual bool wantsShadowToBeRendered() const; bool wantsShadowToBeRendered() const;
/** /**
* This method returns the area that the Window window reports to be opaque. * This method returns the area that the Window window reports to be opaque.
@ -997,7 +997,7 @@ public:
/** /**
* Returns @c true if the window is shaded and shadeMode is @c ShadeNormal; otherwise returns @c false. * Returns @c true if the window is shaded and shadeMode is @c ShadeNormal; otherwise returns @c false.
*/ */
virtual bool isShade() const bool isShade() const
{ {
return shadeMode() == ShadeNormal; return shadeMode() == ShadeNormal;
} }
@ -1086,7 +1086,7 @@ public:
{ {
return QuickTileMode(m_quickTileMode); return QuickTileMode(m_quickTileMode);
} }
virtual Layer layer() const; Layer layer() const;
void updateLayer(); void updateLayer();
Tile *tile() const; Tile *tile() const;