winit/src/platform_impl/linux/x11
Daniel Müller 6c1d3c4fd8
Fix scale factor calculation when the only monitor is reconnected
The scale factor being sent when the only monitor is disconnected and
reconnected is hard coded to 1.0. That may work by chance, if that's the
scale factor in use currently, but it does not work in the general case.
As a result, clients may end up with wrongly scaled or laid out window
contents after reconnect, as was reported over in
https://github.com/alacritty/alacritty/issues/5703, for example.

The problem was introduced by change 125ee0b, which caused an additional
ScaleFactorChanged event to be sent on monitor reconnect, but got the
scale factor wrong when the only monitor is disconnected and
reconnected.
This change fixes the problem by using the current monitor's scale
factor in this case. The event is still being sent as intended by
125ee0b.

Fixes #2123.
2022-03-31 17:43:48 +03:00
..
ime Fix clippy warnings (#2108) 2022-01-01 03:00:11 +01:00
util Fix clippy warnings (#2108) 2022-01-01 03:00:11 +01:00
dnd.rs Format everything and add rustfmt to travis (#951) 2019-06-21 11:33:15 -04:00
event_processor.rs Fix scale factor calculation when the only monitor is reconnected 2022-03-31 17:43:48 +03:00
events.rs Add new mappings for numlock, numpadenter and numpadcomma on X11 (#1937) 2021-12-11 03:14:31 +01:00
ffi.rs Implemented focus_window (#1944) 2021-05-19 18:39:53 +02:00
mod.rs On X11, Fix for repeated event loop iteration when ControlFlow was Wait (#2155) 2022-02-04 12:13:04 +01:00
monitor.rs Fix clippy warnings (#2108) 2022-01-01 03:00:11 +01:00
window.rs feat: add Window::is_visible (#2169) 2022-02-17 19:44:14 +01:00
xdisplay.rs Fix warnings on all platforms (#1383) 2020-01-09 22:29:31 -07:00