From ae50f8614d92132d918663ea7551bd68eb13953a Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 3 Aug 2024 17:58:06 +0200 Subject: wayland/surface: fixup self-owning surface roles fixes #7133 --- src/protocols/LayerShell.hpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src/protocols/LayerShell.hpp') diff --git a/src/protocols/LayerShell.hpp b/src/protocols/LayerShell.hpp index ee0b7859..801bdfd6 100644 --- a/src/protocols/LayerShell.hpp +++ b/src/protocols/LayerShell.hpp @@ -12,16 +12,26 @@ class CMonitor; class CWLSurfaceResource; +class CLayerShellResource; -class CLayerShellResource : public ISurfaceRole { +class CLayerShellRole : public ISurfaceRole { + public: + CLayerShellRole(SP ls); + + virtual eSurfaceRole role() { + return SURFACE_ROLE_LAYER_SHELL; + } + + WP layerSurface; +}; +class CLayerShellResource { public: CLayerShellResource(SP resource_, SP surf_, std::string namespace_, CMonitor* pMonitor, zwlrLayerShellV1Layer layer); ~CLayerShellResource(); - bool good(); - void configure(const Vector2D& size); - void sendClosed(); - virtual eSurfaceRole role(); + bool good(); + void configure(const Vector2D& size); + void sendClosed(); enum eCommittedState { STATE_SIZE = (1 << 0), -- cgit v1.2.3