@ -41,6 +41,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// c++
# include <functional>
# if HAVE_WAYLAND
namespace KWayland
{
namespace Server
{
class SurfaceInterface ;
}
}
# endif
namespace KWin
{
@ -344,6 +354,10 @@ public:
void setSkipCloseAnimation ( bool set ) ;
quint32 surfaceId ( ) const ;
# if HAVE_WAYLAND
KWayland : : Server : : SurfaceInterface * surface ( ) const ;
void setSurface ( KWayland : : Server : : SurfaceInterface * surface ) ;
# endif
virtual void sendPointerMoveEvent ( const QPointF & globalPos ) ;
virtual void sendPointerEnterEvent ( const QPointF & globalPos ) ;
@ -482,6 +496,9 @@ private:
int m_screen ;
bool m_skipCloseAnimation ;
quint32 m_surfaceId = 0 ;
# if HAVE_WAYLAND
KWayland : : Server : : SurfaceInterface * m_surface = nullptr ;
# endif
// when adding new data members, check also copyToDeleted()
} ;
@ -718,6 +735,18 @@ inline quint32 Toplevel::surfaceId() const
return m_surfaceId ;
}
# if HAVE_WAYLAND
inline KWayland : : Server : : SurfaceInterface * Toplevel : : surface ( ) const
{
return m_surface ;
}
inline void Toplevel : : setSurface ( KWayland : : Server : : SurfaceInterface * surface )
{
m_surface = surface ;
}
# endif
template < class T , class U >
inline T * Toplevel : : findInList ( const QList < T * > & list , std : : function < bool ( const U * ) > func )
{