blob: aed1ab04fe56ccaace3f6255faf53ab6d72b7450 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
use std::time::Duration;
use alacritty_config_derive::ConfigDeserialize;
#[derive(ConfigDeserialize, Default, Clone, Debug, PartialEq, Eq)]
pub struct Mouse {
pub double_click: ClickHandler,
pub triple_click: ClickHandler,
pub hide_when_typing: bool,
}
#[derive(ConfigDeserialize, Clone, Debug, PartialEq, Eq)]
pub struct ClickHandler {
threshold: u16,
}
impl Default for ClickHandler {
fn default() -> Self {
Self { threshold: 300 }
}
}
impl ClickHandler {
pub fn threshold(&self) -> Duration {
Duration::from_millis(self.threshold as u64)
}
}
|