Commit 2ed00e4a authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

Move XdgSurfaceClient::updateDepth to WaylandClient

It is strictly related to the surface and this way it can be used from
elsewhere.
parent 2e8f4964
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment