Compare commits
3 Commits
a7128eaf34
...
3e48488201
Author | SHA1 | Date |
---|---|---|
LeRoyce Pearson | 3e48488201 | |
LeRoyce Pearson | b46131a80a | |
LeRoyce Pearson | 1d5a5b3265 |
|
@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void {
|
|||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const module = b.addModule("wayland", .{
|
||||
.source_file = .{ .path = "src/main.zig" },
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
});
|
||||
|
||||
const lib = b.addStaticLibrary(.{
|
||||
|
@ -41,6 +41,6 @@ pub fn build(b: *std.Build) void {
|
|||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
client_connect_exe.addModule("wayland", module);
|
||||
client_connect_exe.root_module.addImport("wayland", module);
|
||||
b.installArtifact(client_connect_exe);
|
||||
}
|
||||
|
|
|
@ -416,6 +416,10 @@ pub fn registerGlobals(alloc: std.mem.Allocator, id_pool: *IdPool, socket: std.n
|
|||
.global => |global| {
|
||||
var buffer: [20]u32 = undefined;
|
||||
if (map.get(global.interface)) |item| {
|
||||
if (global.version < item.version) {
|
||||
// TODO: Add diagnostics API
|
||||
return error.OutdatedCompositorProtocol;
|
||||
}
|
||||
const new_id = id_pool.create();
|
||||
ids[item.index] = new_id;
|
||||
const message = try serialize(core.Registry.Request, &buffer, registry_id, .{ .bind = .{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
pub const WmBase = struct {
|
||||
pub const INTERFACE = "xdg_wm_base";
|
||||
pub const VERSION = 4;
|
||||
pub const VERSION = 2;
|
||||
|
||||
pub const Request = union(Request.Tag) {
|
||||
destroy: void,
|
||||
|
|
Loading…
Reference in New Issue