config: make attach-mode global

This commit is contained in:
novakane
2021-06-08 09:50:42 +02:00
committed by Isaac Freund
parent 75814eb876
commit 2e7c1dbe6a
7 changed files with 13 additions and 12 deletions

View File

@ -296,7 +296,7 @@ pub fn sendToOutput(self: *Self, destination_output: *Output) void {
const node = @fieldParentPtr(ViewStack(Self).Node, "view", self);
self.output.views.remove(node);
destination_output.views.attach(node, destination_output.attach_mode);
destination_output.views.attach(node, server.config.attach_mode);
self.output.sendViewTags();
destination_output.sendViewTags();
@ -466,7 +466,7 @@ pub fn map(self: *Self) void {
// Add the view to the stack of its output
const node = @fieldParentPtr(ViewStack(Self).Node, "view", self);
self.output.views.attach(node, self.output.attach_mode);
self.output.views.attach(node, server.config.attach_mode);
// Focus the new view, assuming the seat is focusing the proper output
// and there isn't something else like a fullscreen view grabbing focus.