Xwayland: handle override redirect state changes

This commit is contained in:
Isaac Freund
2022-05-29 15:16:48 +02:00
parent 8a8dd9ff65
commit 6ef97eea24
4 changed files with 84 additions and 13 deletions

View File

@ -126,11 +126,16 @@ foreign_close: wl.Listener(*wlr.ForeignToplevelHandleV1) =
request_activate: wl.Listener(*wlr.XdgActivationV1.event.RequestActivate) =
wl.Listener(*wlr.XdgActivationV1.event.RequestActivate).init(handleRequestActivate),
pub fn init(self: *Self, output: *Output, tags: u32, surface: anytype) void {
pub fn init(self: *Self, output: *Output, surface: anytype) void {
const initial_tags = blk: {
const tags = output.current.tags & output.spawn_tagmask;
break :blk if (tags != 0) tags else output.current.tags;
};
self.* = .{
.output = output,
.current = .{ .tags = tags },
.pending = .{ .tags = tags },
.current = .{ .tags = initial_tags },
.pending = .{ .tags = initial_tags },
.saved_buffers = std.ArrayList(SavedBuffer).init(util.gpa),
};