XdgToplevel: store scene node in wlr_surface data

This was accidentally removed in 05eac54b077, which broke
SceneNodeData.fromSurface() for xdg_toplevels.

This means that thing such as xdg-activation and idle inhibit didn't
work since that commit and should work again starting from this commit.
This commit is contained in:
Isaac Freund 2023-06-05 19:49:39 +02:00
parent 792d94253c
commit 6e2169a149
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -86,6 +86,7 @@ pub fn create(xdg_toplevel: *wlr.XdgToplevel) error{OutOfMemory}!void {
self.view = view; self.view = view;
xdg_toplevel.base.data = @ptrToInt(self); xdg_toplevel.base.data = @ptrToInt(self);
xdg_toplevel.base.surface.data = @ptrToInt(&view.tree.node);
// Add listeners that are active over the toplevel's entire lifetime // Add listeners that are active over the toplevel's entire lifetime
xdg_toplevel.base.events.destroy.add(&self.destroy); xdg_toplevel.base.events.destroy.add(&self.destroy);