diff --git a/src/server/subcompositor_interface.h b/src/server/subcompositor_interface.h --- a/src/server/subcompositor_interface.h +++ b/src/server/subcompositor_interface.h @@ -82,8 +82,20 @@ **/ bool isSynchronized() const; + // TODO: remove with ABI break (KF6) QPointer surface(); + /** + * @returns The surface this SubSurfaceInterface was created on. + * @since 5.7 + **/ + QPointer surface() const; + // TODO: remove with ABI break (KF6) QPointer parentSurface(); + /** + * @returns The parent surface for which this SubSurfaceInterface is a child + * @since 5.7 + **/ + QPointer parentSurface() const; /** * @returns the main surface for the sub-surface tree, that is the first surface without a parent diff --git a/src/server/subcompositor_interface.cpp b/src/server/subcompositor_interface.cpp --- a/src/server/subcompositor_interface.cpp +++ b/src/server/subcompositor_interface.cpp @@ -295,12 +295,26 @@ QPointer SubSurfaceInterface::surface() { + // TODO: remove with ABI break (KF6) + Q_D(); + return d->surface; +} + +QPointer SubSurfaceInterface::surface() const +{ Q_D(); return d->surface; } QPointer SubSurfaceInterface::parentSurface() { + // TODO: remove with ABI break (KF6) + Q_D(); + return d->parent; +} + +QPointer SubSurfaceInterface::parentSurface() const +{ Q_D(); return d->parent; }