Make Window::updateShadow() agnostic about compositing status
The Shadow no longer owns the texture, so it can be loaded while compositing is off. This changes removes the compositing status check to simplify code.
This commit is contained in:
parent
5f4124360b
commit
0880fec9c7
3 changed files with 3 additions and 5 deletions
|
@ -49,6 +49,7 @@ InternalWindow::InternalWindow(QWindow *handle)
|
|||
setOpacity(m_handle->opacity());
|
||||
setSkipCloseAnimation(m_handle->property(s_skipClosePropertyName).toBool());
|
||||
updateColorScheme();
|
||||
updateShadow();
|
||||
|
||||
setMoveResizeGeometry(m_handle->geometry());
|
||||
commitGeometry(m_handle->geometry());
|
||||
|
|
|
@ -212,7 +212,6 @@ bool Window::setupCompositing()
|
|||
}
|
||||
|
||||
m_effectWindow = std::make_unique<EffectWindowImpl>(this);
|
||||
updateShadow();
|
||||
|
||||
m_windowItem = createItem(scene);
|
||||
m_windowItem->setParentItem(scene->containerItem());
|
||||
|
@ -226,7 +225,6 @@ bool Window::setupCompositing()
|
|||
|
||||
void Window::finishCompositing()
|
||||
{
|
||||
m_shadow.reset();
|
||||
m_effectWindow.reset();
|
||||
m_windowItem.reset();
|
||||
}
|
||||
|
@ -271,9 +269,6 @@ Shadow *Window::shadow() const
|
|||
|
||||
void Window::updateShadow()
|
||||
{
|
||||
if (!Compositor::compositing()) {
|
||||
return;
|
||||
}
|
||||
if (m_shadow) {
|
||||
if (!m_shadow->updateShadow()) {
|
||||
m_shadow.reset();
|
||||
|
|
|
@ -551,6 +551,7 @@ bool X11Window::track(xcb_window_t w)
|
|||
detectShape();
|
||||
getWmOpaqueRegion();
|
||||
getSkipCloseAnimation();
|
||||
updateShadow();
|
||||
setupCompositing();
|
||||
if (QWindow *internalWindow = findInternalWindow()) {
|
||||
m_outline = internalWindow->property("__kwin_outline").toBool();
|
||||
|
@ -673,6 +674,7 @@ bool X11Window::manage(xcb_window_t w, bool isMapped)
|
|||
getMotifHints();
|
||||
getWmOpaqueRegion();
|
||||
readSkipCloseAnimation(skipCloseAnimationCookie);
|
||||
updateShadow();
|
||||
|
||||
// TODO: Try to obey all state information from info->state()
|
||||
|
||||
|
|
Loading…
Reference in a new issue