aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/protocols/XDGShell.hpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-08-03 17:58:06 +0200
committerVaxry <[email protected]>2024-08-03 17:58:06 +0200
commitae50f8614d92132d918663ea7551bd68eb13953a (patch)
tree566b716cbb4e3c56f2977c8c86dc73e6ccf50524 /src/protocols/XDGShell.hpp
parent9f5a57ff4569db57372bd86bd48add85a3a1a5e4 (diff)
downloadHyprland-ae50f8614d92132d918663ea7551bd68eb13953a.tar.gz
Hyprland-ae50f8614d92132d918663ea7551bd68eb13953a.zip
wayland/surface: fixup self-owning surface roles
fixes #7133
Diffstat (limited to 'src/protocols/XDGShell.hpp')
-rw-r--r--src/protocols/XDGShell.hpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/protocols/XDGShell.hpp b/src/protocols/XDGShell.hpp
index e6812c38..81d10613 100644
--- a/src/protocols/XDGShell.hpp
+++ b/src/protocols/XDGShell.hpp
@@ -141,15 +141,24 @@ class CXDGToplevelResource {
void applyState();
};
-class CXDGSurfaceResource : public ISurfaceRole {
+class CXDGSurfaceRole : public ISurfaceRole {
+ public:
+ CXDGSurfaceRole(SP<CXDGSurfaceResource> xdg);
+
+ virtual eSurfaceRole role() {
+ return SURFACE_ROLE_XDG_SHELL;
+ }
+
+ WP<CXDGSurfaceResource> xdgSurface;
+};
+
+class CXDGSurfaceResource {
public:
CXDGSurfaceResource(SP<CXdgSurface> resource_, SP<CXDGWMBase> owner_, SP<CWLSurfaceResource> surface_);
~CXDGSurfaceResource();
static SP<CXDGSurfaceResource> fromResource(wl_resource*);
- virtual eSurfaceRole role();
-
bool good();
WP<CXDGWMBase> owner;