river: add -no-xwayland cli flag

Add a cli flag to disable xwayland at runtime even if river has been
built with xwayland support.
This commit is contained in:
Hugo Machet
2024-02-19 11:30:26 +01:00
committed by Isaac Freund
parent ec9a1b4303
commit 7f1f9152f2
5 changed files with 42 additions and 21 deletions

View File

@ -88,7 +88,11 @@ pub fn init(self: *Self) !void {
self.seats.prepend(seat_node);
try seat_node.data.init(default_seat_name);
if (build_options.xwayland) server.xwayland.setSeat(self.defaultSeat().wlr_seat);
if (build_options.xwayland) {
if (server.xwayland) |xwayland| {
xwayland.setSeat(self.defaultSeat().wlr_seat);
}
}
server.backend.events.new_input.add(&self.new_input);
self.virtual_pointer_manager.events.new_virtual_pointer.add(&self.new_virtual_pointer);