xwayland: Honor primary output for fractional scale
This commit is contained in:
parent
2a3bd84e22
commit
155f8d20d0
1 changed files with 11 additions and 4 deletions
|
|
@ -569,10 +569,16 @@ impl Common {
|
||||||
}
|
}
|
||||||
XwaylandDescaling::Fractional => {
|
XwaylandDescaling::Fractional => {
|
||||||
let shell = self.shell.read().unwrap();
|
let shell = self.shell.read().unwrap();
|
||||||
shell
|
let val =
|
||||||
.outputs()
|
if let Some(output) = shell.outputs().find(|o| o.config().xwayland_primary) {
|
||||||
.map(|o| o.current_scale().fractional_scale())
|
output.current_scale().fractional_scale().max(1f64)
|
||||||
.fold(1f64, |acc, val| acc.max(val))
|
} else {
|
||||||
|
shell
|
||||||
|
.outputs()
|
||||||
|
.map(|o| o.current_scale().fractional_scale())
|
||||||
|
.fold(1f64, |acc, val| acc.max(val))
|
||||||
|
};
|
||||||
|
val
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1143,6 +1149,7 @@ impl XwmHandler for State {
|
||||||
output_name.as_deref().is_some_and(|o| o == output.name());
|
output_name.as_deref().is_some_and(|o| o == output.name());
|
||||||
}
|
}
|
||||||
self.common.output_configuration_state.update();
|
self.common.output_configuration_state.update();
|
||||||
|
self.common.update_xwayland_scale();
|
||||||
self.common
|
self.common
|
||||||
.config
|
.config
|
||||||
.write_outputs(self.common.output_configuration_state.outputs());
|
.write_outputs(self.common.output_configuration_state.outputs());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue