code: use zig 0.7.0 and wlroots 0.12.0
This commit is contained in:
parent
5a6018f428
commit
a90ddd305b
@ -29,10 +29,10 @@ git submodule update --init
|
||||
To compile river first ensure that you have the following dependencies
|
||||
installed:
|
||||
|
||||
- [zig](https://ziglang.org/download/) master (will stick with 0.7.0 when it is released)
|
||||
- [zig](https://ziglang.org/download/) 0.7.0
|
||||
- wayland
|
||||
- wayland-protocols
|
||||
- [wlroots](https://github.com/swaywm/wlroots) 0.11.0
|
||||
- [wlroots](https://github.com/swaywm/wlroots) 0.12.0
|
||||
- xkbcommon
|
||||
- libevdev
|
||||
- pixman
|
||||
|
@ -111,19 +111,9 @@ fn handleUnmap(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
|
||||
|
||||
log.debug(.layer_shell, "layer surface '{}' unmapped", .{self.wlr_layer_surface.namespace});
|
||||
|
||||
// This is a bit ugly: we need to use the wlr bool here since surfaces
|
||||
// may be closed during the inital configure which we preform
|
||||
// while unmapped. wlroots currently calls unmap unconditionally on close
|
||||
// even if the surface is not mapped. I sent a patch which was merged, but
|
||||
// we need to wait for a release to use it.
|
||||
//
|
||||
// TODO(wlroots): Remove this check on updating
|
||||
// https://github.com/swaywm/wlroots/commit/11e94c406bb75c9a8990ce99489798411deb110c
|
||||
if (self.wlr_layer_surface.mapped) {
|
||||
// remove listeners only active while the layer surface is mapped
|
||||
c.wl_list_remove(&self.listen_commit.link);
|
||||
c.wl_list_remove(&self.listen_new_popup.link);
|
||||
}
|
||||
// remove listeners only active while the layer surface is mapped
|
||||
c.wl_list_remove(&self.listen_commit.link);
|
||||
c.wl_list_remove(&self.listen_new_popup.link);
|
||||
|
||||
// Remove from the output's list of layer surfaces
|
||||
const self_node = @fieldParentPtr(std.TailQueue(Self).Node, "data", self);
|
||||
|
@ -402,18 +402,6 @@ fn arrangeLayer(
|
||||
new_box.x = bounds.x + @intCast(i32, current_state.margin.left);
|
||||
new_box.width = bounds.width -
|
||||
(current_state.margin.left + current_state.margin.right);
|
||||
} else {
|
||||
log.err(
|
||||
.layer_shell,
|
||||
"layer surface '{s}' requested width 0 without setting left and right anchors",
|
||||
.{layer_surface.wlr_layer_surface.namespace},
|
||||
);
|
||||
c.wl_resource_post_error(
|
||||
layer_surface.wlr_layer_surface.resource,
|
||||
c.ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE,
|
||||
"width 0 requested without setting left and right anchors",
|
||||
);
|
||||
continue;
|
||||
}
|
||||
} else if (current_state.anchor & anchor_left != 0) {
|
||||
new_box.x = bounds.x + @intCast(i32, current_state.margin.left);
|
||||
@ -436,18 +424,6 @@ fn arrangeLayer(
|
||||
new_box.y = bounds.y + @intCast(i32, current_state.margin.top);
|
||||
new_box.height = bounds.height -
|
||||
(current_state.margin.top + current_state.margin.bottom);
|
||||
} else {
|
||||
log.err(
|
||||
.layer_shell,
|
||||
"layer surface '{s}' requested height 0 without setting top and bottom anchors",
|
||||
.{layer_surface.wlr_layer_surface.namespace},
|
||||
);
|
||||
c.wl_resource_post_error(
|
||||
layer_surface.wlr_layer_surface.resource,
|
||||
c.ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE,
|
||||
"height 0 requested without setting top and bottom anchors",
|
||||
);
|
||||
continue;
|
||||
}
|
||||
} else if (current_state.anchor & anchor_top != 0) {
|
||||
new_box.y = bounds.y + @intCast(i32, current_state.margin.top);
|
||||
@ -595,11 +571,6 @@ fn handleFrame(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
|
||||
// This function is called every time an output is ready to display a frame,
|
||||
// generally at the output's refresh rate (e.g. 60Hz).
|
||||
const self = @fieldParentPtr(Self, "listen_frame", listener.?);
|
||||
|
||||
// TODO(wlroots) Remove this check when we update wlroots 0.11 to 0.12
|
||||
// wlroots fix: https://github.com/swaywm/wlroots/commit/85757665e6e1393773b36282aa244feb10b7a5fe
|
||||
if (!self.wlr_output.enabled) return;
|
||||
|
||||
render.renderOutput(self);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user