diff --git a/src/inputpanelv1window.cpp b/src/inputpanelv1window.cpp index 8673faa36d..14a7a306db 100644 --- a/src/inputpanelv1window.cpp +++ b/src/inputpanelv1window.cpp @@ -182,7 +182,6 @@ void InputPanelV1Window::moveResizeInternal(const QRectF &rect, MoveResizeMode m void InputPanelV1Window::handleMapped() { - updateDepth(); maybeShow(); } diff --git a/src/layershellv1window.cpp b/src/layershellv1window.cpp index 93bf4f04af..6f1a0fa2ae 100644 --- a/src/layershellv1window.cpp +++ b/src/layershellv1window.cpp @@ -250,7 +250,6 @@ void LayerShellV1Window::handleUnmapped() void LayerShellV1Window::handleCommitted() { if (surface()->buffer()) { - updateDepth(); setReadyForPainting(); } } diff --git a/src/waylandwindow.cpp b/src/waylandwindow.cpp index 4afb01054d..e7f25abd26 100644 --- a/src/waylandwindow.cpp +++ b/src/waylandwindow.cpp @@ -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()) { diff --git a/src/waylandwindow.h b/src/waylandwindow.h index bb871448b7..2df94dbd96 100644 --- a/src/waylandwindow.h +++ b/src/waylandwindow.h @@ -36,7 +36,6 @@ public: virtual QRectF frameRectToBufferRect(const QRectF &rect) const; bool isHidden() const; - void updateDepth(); void setCaption(const QString &caption); protected: diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index e38ba3bbc5..4201862997 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -175,7 +175,6 @@ void XdgSurfaceWindow::handleCommit() m_lastAcknowledgedConfigureSerial.reset(); setReadyForPainting(); - updateDepth(); } void XdgSurfaceWindow::handleRolePrecommit()