wayland: Initialize Window::depth to 32
Window::depth and Window::hasAlpha make no sense on Wayland. The main reason why we can't rid of them completely yet are X11Window and Unmanaged. This change makes WaylandWindow initialize depth to 32 by default to make wayland window subclasses less boilerplaty.
This commit is contained in:
parent
3b12058135
commit
db55a6f909
5 changed files with 1 additions and 13 deletions
|
@ -182,7 +182,6 @@ void InputPanelV1Window::moveResizeInternal(const QRectF &rect, MoveResizeMode m
|
|||
|
||||
void InputPanelV1Window::handleMapped()
|
||||
{
|
||||
updateDepth();
|
||||
maybeShow();
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,6 @@ void LayerShellV1Window::handleUnmapped()
|
|||
void LayerShellV1Window::handleCommitted()
|
||||
{
|
||||
if (surface()->buffer()) {
|
||||
updateDepth();
|
||||
setReadyForPainting();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ Q_DECLARE_FLAGS(WaylandGeometryTypes, WaylandGeometryType)
|
|||
WaylandWindow::WaylandWindow(SurfaceInterface *surface)
|
||||
{
|
||||
setSurface(surface);
|
||||
setDepth(32);
|
||||
setupCompositing();
|
||||
|
||||
connect(surface, &SurfaceInterface::shadowChanged,
|
||||
|
@ -220,15 +221,6 @@ void WaylandWindow::doSetActive()
|
|||
}
|
||||
}
|
||||
|
||||
void WaylandWindow::updateDepth()
|
||||
{
|
||||
if (surface()->buffer()->hasAlphaChannel()) {
|
||||
setDepth(32);
|
||||
} else {
|
||||
setDepth(24);
|
||||
}
|
||||
}
|
||||
|
||||
void WaylandWindow::cleanGrouping()
|
||||
{
|
||||
if (transientFor()) {
|
||||
|
|
|
@ -36,7 +36,6 @@ public:
|
|||
virtual QRectF frameRectToBufferRect(const QRectF &rect) const;
|
||||
bool isHidden() const;
|
||||
|
||||
void updateDepth();
|
||||
void setCaption(const QString &caption);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -175,7 +175,6 @@ void XdgSurfaceWindow::handleCommit()
|
|||
m_lastAcknowledgedConfigureSerial.reset();
|
||||
|
||||
setReadyForPainting();
|
||||
updateDepth();
|
||||
}
|
||||
|
||||
void XdgSurfaceWindow::handleRolePrecommit()
|
||||
|
|
Loading…
Reference in a new issue