This commit is contained in:
Josh Groves 2022-07-15 14:02:12 -02:30 committed by GitHub
parent 1091a8ba1a
commit 430a49ebc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 12 additions and 12 deletions

View file

@ -77,7 +77,7 @@
//! currently uses a three-pronged approach: //! currently uses a three-pronged approach:
//! + Use the value in the `WINIT_X11_SCALE_FACTOR` environment variable, if present. //! + Use the value in the `WINIT_X11_SCALE_FACTOR` environment variable, if present.
//! + If not present, use the value set in `Xft.dpi` in Xresources. //! + If not present, use the value set in `Xft.dpi` in Xresources.
//! + Otherwise, calcuate the scale factor based on the millimeter monitor dimensions provided by XRandR. //! + Otherwise, calculate the scale factor based on the millimeter monitor dimensions provided by XRandR.
//! //!
//! If `WINIT_X11_SCALE_FACTOR` is set to `randr`, it'll ignore the `Xft.dpi` field and use the //! If `WINIT_X11_SCALE_FACTOR` is set to `randr`, it'll ignore the `Xft.dpi` field and use the
//! XRandR scaling method. Generally speaking, you should try to configure the standard system //! XRandR scaling method. Generally speaking, you should try to configure the standard system

View file

@ -383,7 +383,7 @@ impl<T> fmt::Display for EventLoopClosed<T> {
impl<T: fmt::Debug> error::Error for EventLoopClosed<T> {} impl<T: fmt::Debug> error::Error for EventLoopClosed<T> {}
/// Fiter controlling the propagation of device events. /// Filter controlling the propagation of device events.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum DeviceEventFilter { pub enum DeviceEventFilter {
/// Always filter out device events. /// Always filter out device events.

View file

@ -881,7 +881,7 @@ impl MonitorHandle {
} }
pub fn refresh_rate_millihertz(&self) -> Option<u32> { pub fn refresh_rate_millihertz(&self) -> Option<u32> {
// FIXME no way to get real refrsh rate for now. // FIXME no way to get real refresh rate for now.
None None
} }

View file

@ -64,7 +64,7 @@ pub struct EventLoopWindowTarget<T> {
/// Theme manager to manage cursors. /// Theme manager to manage cursors.
/// ///
/// It's being shared amoung all windows to avoid loading /// It's being shared between all windows to avoid loading
/// multiple similar themes. /// multiple similar themes.
pub theme_manager: ThemeManager, pub theme_manager: ThemeManager,

View file

@ -90,7 +90,7 @@ impl Window {
.create_surface_with_scale_callback(move |scale, surface, mut dispatch_data| { .create_surface_with_scale_callback(move |scale, surface, mut dispatch_data| {
let winit_state = dispatch_data.get::<WinitState>().unwrap(); let winit_state = dispatch_data.get::<WinitState>().unwrap();
// Get the window that receiced the event. // Get the window that received the event.
let window_id = super::make_wid(&surface); let window_id = super::make_wid(&surface);
let mut window_update = winit_state.window_updates.get_mut(&window_id).unwrap(); let mut window_update = winit_state.window_updates.get_mut(&window_id).unwrap();

View file

@ -180,10 +180,10 @@ impl PotentialInputMethod {
} }
// By logging this struct, you get a sequential listing of every locale modifier tried, where it // By logging this struct, you get a sequential listing of every locale modifier tried, where it
// came from, and if it succceeded. // came from, and if it succeeded.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct PotentialInputMethods { pub struct PotentialInputMethods {
// On correctly configured systems, the XMODIFIERS environemnt variable tells us everything we // On correctly configured systems, the XMODIFIERS environment variable tells us everything we
// need to know. // need to know.
xmodifiers: Option<PotentialInputMethod>, xmodifiers: Option<PotentialInputMethod>,
// We have some standard options at our disposal that should ostensibly always work. For users // We have some standard options at our disposal that should ostensibly always work. For users
@ -213,7 +213,7 @@ impl PotentialInputMethods {
// that case, we get `None` and end up skipping ahead to the next method. // that case, we get `None` and end up skipping ahead to the next method.
xmodifiers, xmodifiers,
fallbacks: [ fallbacks: [
// This is a standard input method that supports compose equences, which should // This is a standard input method that supports compose sequences, which should
// always be available. `@im=none` appears to mean the same thing. // always be available. `@im=none` appears to mean the same thing.
PotentialInputMethod::from_str("@im=local"), PotentialInputMethod::from_str("@im=local"),
// This explicitly specifies to use the implementation-dependent default, though // This explicitly specifies to use the implementation-dependent default, though

View file

@ -457,7 +457,7 @@ impl<T: 'static> EventLoop<T> {
// must do this because during the execution of the iteration we sometimes wake // must do this because during the execution of the iteration we sometimes wake
// the mio waker, and if the waker is already awaken before we call poll(), // the mio waker, and if the waker is already awaken before we call poll(),
// then poll doesn't block, but it returns immediately. This caused the event // then poll doesn't block, but it returns immediately. This caused the event
// loop to run continously even if the control_flow was `Wait` // loop to run continuously even if the control_flow was `Wait`
continue; continue;
} }
} }

View file

@ -58,7 +58,7 @@ impl XConnection {
property, property,
// This offset is in terms of 32-bit chunks. // This offset is in terms of 32-bit chunks.
offset, offset,
// This is the quanity of 32-bit chunks to receive at once. // This is the quantity of 32-bit chunks to receive at once.
PROPERTY_BUFFER_SIZE, PROPERTY_BUFFER_SIZE,
ffi::False, ffi::False,
property_type, property_type,

View file

@ -65,7 +65,7 @@ impl<T: 'static> Runner<T> {
} }
} }
/// Returns the cooresponding `StartCause` for the current `state`, or `None` /// Returns the corresponding `StartCause` for the current `state`, or `None`
/// when in `Exit` state. /// when in `Exit` state.
fn maybe_start_cause(&self) -> Option<StartCause> { fn maybe_start_cause(&self) -> Option<StartCause> {
Some(match self.state { Some(match self.state {

View file

@ -625,7 +625,7 @@ impl Window {
self.window.set_visible(visible) self.window.set_visible(visible)
} }
/// Gets the window's current vibility state. /// Gets the window's current visibility state.
/// ///
/// `None` means it couldn't be determined, so it is not recommended to use this to drive your rendering backend. /// `None` means it couldn't be determined, so it is not recommended to use this to drive your rendering backend.
/// ///