aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/config/window.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-11-03 19:37:54 +0300
committerGitHub <noreply@github.com>2022-11-03 19:37:54 +0300
commit0e418bc2f761617455cc58aaabc375055dfe4284 (patch)
treefc15d2260404914e21297d392f7f9c32a5f2bffc /alacritty/src/config/window.rs
parent578e08486dfcdee0b2cd0e7a66752ff50edc46b8 (diff)
downloadr-alacritty-0e418bc2f761617455cc58aaabc375055dfe4284.tar.gz
r-alacritty-0e418bc2f761617455cc58aaabc375055dfe4284.tar.bz2
r-alacritty-0e418bc2f761617455cc58aaabc375055dfe4284.zip
Update glutin to 0.30.0
The glutin 0.30.0 update decouples glutin from winit which provides us with basis for a multithreaded renderer. This also improves robustness of our configuration picking, context creation, and surface handling. As an example we're now able to start on systems without a vsync, we don't try to build lots of contexts to check if some config works, and so on. That also brings us possibility to handle context losses, but that's a future work. Fixes #1268.
Diffstat (limited to 'alacritty/src/config/window.rs')
-rw-r--r--alacritty/src/config/window.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/alacritty/src/config/window.rs b/alacritty/src/config/window.rs
index 5d63d60f..f1a74232 100644
--- a/alacritty/src/config/window.rs
+++ b/alacritty/src/config/window.rs
@@ -1,10 +1,10 @@
use std::fmt::{self, Formatter};
use std::os::raw::c_ulong;
-use glutin::window::Fullscreen;
use log::{error, warn};
use serde::de::{self, MapAccess, Visitor};
use serde::{Deserialize, Deserializer, Serialize};
+use winit::window::Fullscreen;
use alacritty_config_derive::{ConfigDeserialize, SerdeReplace};
use alacritty_terminal::config::{Percentage, LOG_TARGET_CONFIG};
@@ -116,14 +116,14 @@ impl WindowConfig {
pub fn decorations_theme_variant(&self) -> Option<&str> {
self.gtk_theme_variant
.as_ref()
- .or_else(|| self.decorations_theme_variant.as_ref())
+ .or(self.decorations_theme_variant.as_ref())
.map(|theme| theme.as_str())
}
#[inline]
- pub fn padding(&self, scale_factor: f64) -> (f32, f32) {
- let padding_x = (f32::from(self.padding.x) * scale_factor as f32).floor();
- let padding_y = (f32::from(self.padding.y) * scale_factor as f32).floor();
+ pub fn padding(&self, scale_factor: f32) -> (f32, f32) {
+ let padding_x = (f32::from(self.padding.x) * scale_factor).floor();
+ let padding_y = (f32::from(self.padding.y) * scale_factor).floor();
(padding_x, padding_y)
}