Xwayland: fix View.fromWlrSurface for OR surfaces
This commit is contained in:
parent
7d9d889226
commit
db366e9455
@ -430,7 +430,7 @@ pub fn fromWlrSurface(surface: *wlr.Surface) ?*Self {
|
||||
if (build_options.xwayland) {
|
||||
if (surface.isXWaylandSurface()) {
|
||||
const xwayland_surface = wlr.XwaylandSurface.fromWlrSurface(surface);
|
||||
return @intToPtr(*Self, xwayland_surface.data);
|
||||
return @intToPtr(?*Self, xwayland_surface.data);
|
||||
}
|
||||
}
|
||||
if (surface.isSubsurface()) {
|
||||
|
@ -53,6 +53,8 @@ pub fn create(xwayland_surface: *wlr.XwaylandSurface) error{OutOfMemory}!*Self {
|
||||
const self = &node.data;
|
||||
|
||||
self.* = .{ .xwayland_surface = xwayland_surface };
|
||||
// This must be set to 0 for usage in View.fromWlrSurface()
|
||||
xwayland_surface.data = 0;
|
||||
|
||||
// Add listeners that are active over the the entire lifetime
|
||||
xwayland_surface.events.request_configure.add(&self.request_configure);
|
||||
|
Loading…
Reference in New Issue
Block a user