deps: update to latest zig-wlroots
This fixes the return type of Foo.fromWlrSurface() functions which can in fact return null in the edge case that the role matches but the corresponding object has already been destroyed.
This commit is contained in:
parent
db366e9455
commit
7402cb8aea
2
deps/zig-wlroots
vendored
2
deps/zig-wlroots
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 597b2448319caa90ebe3625dd03ce925dee08b11
|
Subproject commit 06297208176ac530b4882c92d6b064bda467c001
|
@ -422,17 +422,15 @@ pub fn move(self: *Self, delta_x: i32, delta_y: i32) void {
|
|||||||
/// Find and return the view corresponding to a given surface, if any
|
/// Find and return the view corresponding to a given surface, if any
|
||||||
pub fn fromWlrSurface(surface: *wlr.Surface) ?*Self {
|
pub fn fromWlrSurface(surface: *wlr.Surface) ?*Self {
|
||||||
if (surface.isXdgSurface()) {
|
if (surface.isXdgSurface()) {
|
||||||
const xdg_surface = wlr.XdgSurface.fromWlrSurface(surface);
|
const xdg_surface = wlr.XdgSurface.fromWlrSurface(surface) orelse return null;
|
||||||
if (xdg_surface.role == .toplevel) {
|
if (xdg_surface.role == .toplevel) {
|
||||||
return @intToPtr(*Self, xdg_surface.data);
|
return @intToPtr(*Self, xdg_surface.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (build_options.xwayland) {
|
if (build_options.xwayland and surface.isXWaylandSurface()) {
|
||||||
if (surface.isXWaylandSurface()) {
|
const xwayland_surface = wlr.XwaylandSurface.fromWlrSurface(surface) orelse return null;
|
||||||
const xwayland_surface = wlr.XwaylandSurface.fromWlrSurface(surface);
|
|
||||||
return @intToPtr(?*Self, xwayland_surface.data);
|
return @intToPtr(?*Self, xwayland_surface.data);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (surface.isSubsurface()) {
|
if (surface.isSubsurface()) {
|
||||||
if (wlr.Subsurface.fromWlrSurface(surface)) |ss| {
|
if (wlr.Subsurface.fromWlrSurface(surface)) |ss| {
|
||||||
if (ss.parent) |s| {
|
if (ss.parent) |s| {
|
||||||
|
Loading…
Reference in New Issue
Block a user