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();
}
int Unmanaged::desktop() const
{
return NET::OnAllDesktops; // TODO for some window types should be the current desktop?
}
QStringList Unmanaged::activities() const
{
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
{
// for unmanaged windows the direct does not make any difference

View file

@ -27,10 +27,7 @@ public:
bool track(xcb_window_t w);
bool hasScheduledRelease() const;
static void deleteUnmanaged(Unmanaged *c);
int desktop() 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;
bool isOutline() const override;
bool isUnmanaged() const override;

View file

@ -606,7 +606,7 @@ public:
bool isOnActiveOutput() const;
Output *output() const;
void setOutput(Output *output);
virtual QPointF clientPos() const
QPointF clientPos() const
{
return QPointF(borderLeft(), borderTop());
}; // inside of geometry()
@ -664,8 +664,8 @@ public:
* or NET::OnAllDesktops. Do not use desktop() directly, use
* isOnDesktop() instead.
*/
virtual int desktop() const;
virtual QVector<VirtualDesktop *> desktops() const;
int desktop() const;
QVector<VirtualDesktop *> desktops() const;
virtual QStringList activities() const;
bool isOnDesktop(VirtualDesktop *desktop) const;
bool isOnDesktop(int d) const;
@ -723,7 +723,7 @@ public:
* Whether the Window currently wants the shadow to be rendered. Default
* 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.
@ -997,7 +997,7 @@ public:
/**
* 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;
}
@ -1086,7 +1086,7 @@ public:
{
return QuickTileMode(m_quickTileMode);
}
virtual Layer layer() const;
Layer layer() const;
void updateLayer();
Tile *tile() const;