glfw: better handle Wayland limitations

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-07-23 14:05:54 -07:00
parent 8ccae4cb1a
commit a690b84732
2 changed files with 7 additions and 3 deletions

View file

@ -447,7 +447,8 @@ test "setIcon" {
icon.pixels[(x * y * 4) + 3] = 255; // alpha
}
}
try window.setIcon(allocator, &[_]Image{icon});
window.setIcon(allocator, &[_]Image{icon}) catch |err| std.debug.print("can't set window icon, wayland maybe? error={}\n", .{err});
icon.deinit(allocator); // glfw copies it.
}
@ -464,5 +465,5 @@ test "getPos" {
};
defer window.destroy();
_ = try window.getPos();
_ = window.getPos() catch |err| std.debug.print("can't get window position, wayland maybe? error={}\n", .{err});
}