layer-shell: default to focused output

Layer shell clients may leave the output on which to display a layer
surface up to the compositor. Instead of always putting such surfaces
on the first output use the focused output of the default seat.
This commit is contained in:
Isaac Freund
2020-09-29 17:27:33 +02:00
parent 3e955935eb
commit d783347476
3 changed files with 20 additions and 22 deletions

View File

@ -316,7 +316,7 @@ pub fn setTheme(self: *Self, theme: ?[*:0]const u8, _size: ?u32) !void {
// If this cursor belongs to the default seat, set the xcursor environment
// variables and the xwayland cursor theme.
if (self.seat == self.seat.input_manager.default_seat) {
if (self.seat == self.seat.input_manager.defaultSeat()) {
const size_str = try std.fmt.allocPrint0(util.gpa, "{}", .{size});
defer util.gpa.free(size_str);
if (c.setenv("XCURSOR_SIZE", size_str, 1) < 0) return error.OutOfMemory;