Add a SurfaceInterface *WindowPixmap::surface() const
Convenience method to get the Surface for a WindowPixmap which is either the toplevel's surface or a SubSurface.
This commit is contained in:
parent
ebbb82906d
commit
354defe499
2 changed files with 14 additions and 0 deletions
|
@ -1082,6 +1082,15 @@ void WindowPixmap::updateBuffer()
|
|||
}
|
||||
}
|
||||
|
||||
KWayland::Server::SurfaceInterface *WindowPixmap::surface() const
|
||||
{
|
||||
if (!m_subSurface.isNull()) {
|
||||
return m_subSurface->surface().data();
|
||||
} else {
|
||||
return toplevel()->surface();
|
||||
}
|
||||
}
|
||||
|
||||
//****************************************
|
||||
// Scene::EffectFrame
|
||||
//****************************************
|
||||
|
|
5
scene.h
5
scene.h
|
@ -414,6 +414,11 @@ public:
|
|||
return m_subSurface;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns the surface this WindowPixmap references, might be @c null.
|
||||
**/
|
||||
KWayland::Server::SurfaceInterface *surface() const;
|
||||
|
||||
protected:
|
||||
explicit WindowPixmap(Scene::Window *window);
|
||||
explicit WindowPixmap(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface, WindowPixmap *parent);
|
||||
|
|
Loading…
Reference in a new issue