git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitf3cca1eb45b8147ca4d9813621fa7cf19954075a
parentdc33e7e829
authorIsaac Freund <[email protected]>
date2023-03-08 11:37
Xwayland: eliminate unneeded user data usage

This is some dead code that is left over from before the scene graph
changes.

 river/XwaylandOverrideRedirect.zig | 2 --
 river/XwaylandView.zig             | 1 -
 2 files changed, 3 deletions(-)

diff --git a/river/XwaylandOverrideRedirect.zig b/river/XwaylandOverrideRedirect.zig
index e0a5f94..57d0c7f 100644
--- a/river/XwaylandOverrideRedirect.zig
+++ b/river/XwaylandOverrideRedirect.zig
@@ -48,8 +48,6 @@ pub fn create(xwayland_surface: *wlr.XwaylandSurface) error{OutOfMemory}!void {
     errdefer util.gpa.destroy(self);
 
     self.* = .{ .xwayland_surface = xwayland_surface };
-    // This must be set to 0 for usage in View.fromWlrSurface()
-    xwayland_surface.data = 0;
 
     xwayland_surface.events.request_configure.add(&self.request_configure);
     xwayland_surface.events.destroy.add(&self.destroy);
diff --git a/river/XwaylandView.zig b/river/XwaylandView.zig
index 303c687..f36e2af 100644
--- a/river/XwaylandView.zig
+++ b/river/XwaylandView.zig
@@ -65,7 +65,6 @@ pub fn create(xwayland_surface: *wlr.XwaylandSurface) error{OutOfMemory}!void {
 
     const self = &view.impl.xwayland_view;
     self.view = view;
-    xwayland_surface.data = @ptrToInt(self);
 
     // Add listeners that are active over the view's entire lifetime
     xwayland_surface.events.destroy.add(&self.destroy);