aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty/src')
-rw-r--r--alacritty/src/config/bindings.rs4
-rw-r--r--alacritty/src/event.rs2
-rw-r--r--alacritty/src/wayland_theme.rs4
-rw-r--r--alacritty/src/window.rs21
4 files changed, 9 insertions, 22 deletions
diff --git a/alacritty/src/config/bindings.rs b/alacritty/src/config/bindings.rs
index 62da0e6c..f5b63561 100644
--- a/alacritty/src/config/bindings.rs
+++ b/alacritty/src/config/bindings.rs
@@ -638,7 +638,7 @@ impl<'a> Deserialize<'a> for MouseButtonWrapper {
type Value = MouseButtonWrapper;
fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- f.write_str("Left, Right, Middle, or a number from 0 to 255")
+ f.write_str("Left, Right, Middle, or a number from 0 to 65536")
}
fn visit_u64<E>(self, value: u64) -> Result<MouseButtonWrapper, E>
@@ -646,7 +646,7 @@ impl<'a> Deserialize<'a> for MouseButtonWrapper {
E: de::Error,
{
match value {
- 0..=255 => Ok(MouseButtonWrapper(MouseButton::Other(value as u8))),
+ 0..=65536 => Ok(MouseButtonWrapper(MouseButton::Other(value as u16))),
_ => Err(E::invalid_value(Unexpected::Unsigned(value), &self)),
}
}
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index 8ecf6f00..441cb21e 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -19,7 +19,7 @@ use std::time::{Duration, Instant};
use glutin::dpi::PhysicalSize;
use glutin::event::{ElementState, Event as GlutinEvent, ModifiersState, MouseButton, WindowEvent};
use glutin::event_loop::{ControlFlow, EventLoop, EventLoopProxy, EventLoopWindowTarget};
-use glutin::platform::desktop::EventLoopExtDesktop;
+use glutin::platform::run_return::EventLoopExtRunReturn;
#[cfg(all(feature = "wayland", not(any(target_os = "macos", windows))))]
use glutin::platform::unix::EventLoopWindowTargetExtUnix;
use log::info;
diff --git a/alacritty/src/wayland_theme.rs b/alacritty/src/wayland_theme.rs
index c18044f9..b9c4381e 100644
--- a/alacritty/src/wayland_theme.rs
+++ b/alacritty/src/wayland_theme.rs
@@ -67,10 +67,6 @@ impl WaylandTheme for AlacrittyWaylandTheme {
(_, Button::Close) => self.hovered_close_icon,
}
}
-
- fn font(&self) -> Option<(String, f32)> {
- Some((String::from("sans-serif"), 17.))
- }
}
trait IntoARGBColor {
diff --git a/alacritty/src/window.rs b/alacritty/src/window.rs
index 953fffd9..e43e5c95 100644
--- a/alacritty/src/window.rs
+++ b/alacritty/src/window.rs
@@ -27,10 +27,12 @@ use std::fmt::{self, Display, Formatter};
use glutin::dpi::{PhysicalPosition, PhysicalSize};
use glutin::event_loop::EventLoop;
#[cfg(target_os = "macos")]
-use glutin::platform::macos::{RequestUserAttentionType, WindowBuilderExtMacOS, WindowExtMacOS};
+use glutin::platform::macos::{WindowBuilderExtMacOS, WindowExtMacOS};
#[cfg(windows)]
use glutin::platform::windows::IconExtWindows;
-use glutin::window::{CursorIcon, Fullscreen, Window as GlutinWindow, WindowBuilder, WindowId};
+use glutin::window::{
+ CursorIcon, Fullscreen, UserAttentionType, Window as GlutinWindow, WindowBuilder, WindowId,
+};
use glutin::{self, ContextBuilder, PossiblyCurrent, WindowedContext};
#[cfg(windows)]
use winapi::shared::minwindef::WORD;
@@ -328,23 +330,12 @@ impl Window {
}
}
- #[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
- pub fn set_urgent(&self, is_urgent: bool) {
- self.window().set_urgent(is_urgent);
- }
-
- #[cfg(target_os = "macos")]
pub fn set_urgent(&self, is_urgent: bool) {
- if !is_urgent {
- return;
- }
+ let attention = if is_urgent { Some(UserAttentionType::Critical) } else { None };
- self.window().request_user_attention(RequestUserAttentionType::Critical);
+ self.window().request_user_attention(attention);
}
- #[cfg(any(windows, not(any(feature = "x11", target_os = "macos"))))]
- pub fn set_urgent(&self, _is_urgent: bool) {}
-
pub fn set_outer_position(&self, pos: PhysicalPosition<i32>) {
self.window().set_outer_position(pos);
}