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