View: restore to previous output on reconnect
This commit is contained in:
committed by
Isaac Freund
parent
fecfa89a9a
commit
4e48d68485
@ -22,6 +22,7 @@ const wlr = @import("wlroots");
|
||||
const flags = @import("flags");
|
||||
|
||||
const server = &@import("../main.zig").server;
|
||||
const util = @import("../util.zig");
|
||||
|
||||
const Direction = @import("../command.zig").Direction;
|
||||
const PhysicalDirectionDirection = @import("../command.zig").PhysicalDirection;
|
||||
@ -79,6 +80,14 @@ pub fn sendToOutput(
|
||||
|
||||
seat.focused.view.setPendingOutput(destination_output);
|
||||
|
||||
// When explicitly sending a view to an output, the user likely
|
||||
// does not expect a previously evacuated view moved back to a
|
||||
// re-connecting output.
|
||||
if (seat.focused.view.output_before_evac) |name| {
|
||||
util.gpa.free(name);
|
||||
seat.focused.view.output_before_evac = null;
|
||||
}
|
||||
|
||||
server.root.applyPending();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user