Move XdgSurfaceClient::updateDepth to WaylandClient
It is strictly related to the surface and this way it can be used from elsewhere.
This commit is contained in:
parent
2e8f4964ec
commit
2ed00e4afe
4 changed files with 11 additions and 10 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/clientconnection.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
|
@ -273,4 +274,13 @@ void WaylandClient::doSetActive()
|
|||
}
|
||||
}
|
||||
|
||||
void WaylandClient::updateDepth()
|
||||
{
|
||||
if (surface()->buffer()->hasAlphaChannel() && !isDesktop()) {
|
||||
setDepth(32);
|
||||
} else {
|
||||
setDepth(24);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace KWin
|
||||
|
|
|
@ -37,6 +37,7 @@ public:
|
|||
void killWindow() override;
|
||||
QByteArray windowRole() const override;
|
||||
|
||||
void updateDepth();
|
||||
void setCaption(const QString &caption);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -483,15 +483,6 @@ void XdgSurfaceClient::updateGeometryRestoreHack()
|
|||
}
|
||||
}
|
||||
|
||||
void XdgSurfaceClient::updateDepth()
|
||||
{
|
||||
if (surface()->buffer()->hasAlphaChannel() && !isDesktop()) {
|
||||
setDepth(32);
|
||||
} else {
|
||||
setDepth(24);
|
||||
}
|
||||
}
|
||||
|
||||
QRect XdgSurfaceClient::frameRectToBufferRect(const QRect &rect) const
|
||||
{
|
||||
const int left = rect.left() + borderLeft() - m_windowGeometry.left();
|
||||
|
|
|
@ -99,7 +99,6 @@ private:
|
|||
void resetHaveNextWindowGeometry();
|
||||
QRect adjustMoveResizeGeometry(const QRect &rect) const;
|
||||
void updateGeometryRestoreHack();
|
||||
void updateDepth();
|
||||
void internalShow();
|
||||
void internalHide();
|
||||
void cleanGrouping();
|
||||
|
|
Loading…
Reference in a new issue