Root: fix inflight_layout_demands counting
Not decreasing the counter caused a weird bug where disabling/removing an output (curiously, it seems to apply only to last active output being removed) would lock the user out of the session, not letting the transaction to complete (therefore hiding all views on a newly added output) and messing up focus. Fixes https://github.com/riverwm/river/issues/830
This commit is contained in:
parent
4726a6b0f1
commit
0cc930b738
@ -274,12 +274,6 @@ pub fn deactivateOutput(root: *Self, output: *Output) void {
|
||||
output.active_link.init();
|
||||
}
|
||||
|
||||
if (output.inflight.layout_demand) |layout_demand| {
|
||||
layout_demand.deinit();
|
||||
output.inflight.layout_demand = null;
|
||||
}
|
||||
while (output.layouts.first) |node| node.data.destroy();
|
||||
|
||||
{
|
||||
var it = output.inflight.focus_stack.iterator(.forward);
|
||||
while (it.next()) |view| {
|
||||
@ -335,6 +329,13 @@ pub fn deactivateOutput(root: *Self, output: *Output) void {
|
||||
|
||||
output.status.deinit();
|
||||
output.status.init();
|
||||
|
||||
if (output.inflight.layout_demand) |layout_demand| {
|
||||
layout_demand.deinit();
|
||||
output.inflight.layout_demand = null;
|
||||
root.notifyLayoutDemandDone();
|
||||
}
|
||||
while (output.layouts.first) |node| node.data.destroy();
|
||||
}
|
||||
|
||||
/// Add the output to root.active_outputs and the output layout if it has not
|
||||
|
Loading…
Reference in New Issue
Block a user