Fix sendTo{Prev,Next}Output commands
Before, they would try send the window to the "next" output even if there was only one output... which really just means sending the window to the bottom of the stack. Instead, they should be a noop. Also fixed a bug when removing all outputs where the seat wouldn't clear its focused output.
This commit is contained in:
parent
7045b21534
commit
5f4d80f313
2 changed files with 16 additions and 8 deletions
|
|
@ -333,13 +333,16 @@ const XkbBinding = struct {
|
|||
};
|
||||
|
||||
if (pending_output) |output| {
|
||||
// We have to remove window from current output's windows list first
|
||||
window.link.remove();
|
||||
output.windows.append(window);
|
||||
// This should be a noop if there's only one output
|
||||
if (output != window.output) {
|
||||
// We have to remove window from current output's windows list first
|
||||
window.link.remove();
|
||||
output.windows.append(window);
|
||||
|
||||
seat.pending_manage.output = .{ .output = output };
|
||||
seat.pending_manage.should_warp_pointer = true;
|
||||
window.pending_manage.pending_output = .{ .output = output };
|
||||
seat.pending_manage.output = .{ .output = output };
|
||||
seat.pending_manage.should_warp_pointer = true;
|
||||
window.pending_manage.pending_output = .{ .output = output };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue