aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/input.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-02-18 01:27:10 +0300
committerGitHub <noreply@github.com>2022-02-18 01:27:10 +0300
commit4734b2b85073c775145bce1dd7deefd064003bda (patch)
tree88513eb653d223b77f869a323399d9a933dbc00b /alacritty/src/input.rs
parentaaab88c5c5c94e11ffa3704407a3547cfabe4567 (diff)
downloadr-alacritty-4734b2b85073c775145bce1dd7deefd064003bda.tar.gz
r-alacritty-4734b2b85073c775145bce1dd7deefd064003bda.tar.bz2
r-alacritty-4734b2b85073c775145bce1dd7deefd064003bda.zip
Don't load font twice during display creation
This commit finishes the effort from a64553b to avoid reloading font twice during startup, since the original issue is with getting font metrics without building the glyph cache.
Diffstat (limited to 'alacritty/src/input.rs')
-rw-r--r--alacritty/src/input.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs
index 51bd3fc5..f1b4a138 100644
--- a/alacritty/src/input.rs
+++ b/alacritty/src/input.rs
@@ -923,14 +923,14 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
/// Handle automatic scrolling when selecting above/below the window.
fn update_selection_scrolling(&mut self, mouse_y: i32) {
- let dpr = self.ctx.window().dpr;
+ let scale_factor = self.ctx.window().scale_factor;
let size = self.ctx.size_info();
let window_id = self.ctx.window().id();
let scheduler = self.ctx.scheduler_mut();
// Scale constants by DPI.
- let min_height = (MIN_SELECTION_SCROLLING_HEIGHT * dpr) as i32;
- let step = (SELECTION_SCROLLING_STEP * dpr) as i32;
+ let min_height = (MIN_SELECTION_SCROLLING_HEIGHT * scale_factor) as i32;
+ let step = (SELECTION_SCROLLING_STEP * scale_factor) as i32;
// Compute the height of the scrolling areas.
let end_top = max(min_height, size.padding_y() as i32);