feat: handle global removals, recalc output scale (#367)
All `GlobalRemove` events sent from the server are now handled by recording them in a new clientside `vec` and passing the identifier returned by `create_global` (now stored by a map in the state) to `disable_global`. `handle_globals` (the top-level function) and `handle_new_globals` (the `InnerServerState` member function) have swapped names to better represent their new purposes. This enables action to be taken when globals are removed. In this case, the desired action is to forward output removal, so that the scaling calculation does not account for disconnected monitors in its logic. Resolves #351.
This commit is contained in:
parent
75c9f5e775
commit
0947c4685f
6 changed files with 153 additions and 33 deletions
|
|
@ -1479,6 +1479,7 @@ impl<S: X11Selection> GlobalDispatch<WlOutput, Global> for InnerServerState<S> {
|
|||
client,
|
||||
event::OutputScaleFactor::Output(1),
|
||||
event::OutputDimensions::default(),
|
||||
GlobalName(data.name),
|
||||
),
|
||||
);
|
||||
state.updated_outputs.push(entity);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue