Skip to content

Commit

Permalink
few corrections for non-macos
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Jan 19, 2024
1 parent de39744 commit 7026b36
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// build_key_sequence was originally taken from alacritty
// which is licensed under Apache 2.0 license.

use crate::screen::ElementState;
use crate::screen::Mode;
use crate::screen::ModifiersState;
use rio_backend::crosswords::Mode;
use std::borrow::Cow;
use winit::event::KeyEvent;
use winit::event::{ElementState, KeyEvent};
use winit::keyboard::Key;
use winit::keyboard::KeyLocation;
use winit::keyboard::ModifiersState;
use winit::keyboard::NamedKey::*;

#[inline(never)]
Expand Down
12 changes: 6 additions & 6 deletions frontends/rioterm/src/screen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub mod touch;
use crate::bindings::{
Action as Act, BindingKey, BindingMode, FontSizeAction, MouseBinding, ViAction,
};
use crate::clipboard::{Clipboard, ClipboardType};
#[cfg(target_os = "macos")]
use crate::constants::{DEADZONE_END_Y, DEADZONE_START_X, DEADZONE_START_Y};
use crate::crosswords::{
Expand All @@ -33,6 +32,7 @@ use crate::screen::{context::ContextManager, touch::TouchPurpose};
use crate::selection::{Selection, SelectionType};
use core::fmt::Debug;
use raw_window_handle::{HasDisplayHandle, HasWindowHandle};
use rio_backend::clipboard::{Clipboard, ClipboardType};
use rio_backend::config::{
colors::{term::List, ColorWGPU},
renderer::{Backend as RendererBackend, Performance as RendererPerformance},
Expand Down Expand Up @@ -94,7 +94,7 @@ pub struct Screen {
mouse_bindings: Vec<MouseBinding>,
clipboard: Clipboard,
pub modifiers: Modifiers,
pub mouse: crate::Mouse,
pub mouse: Mouse,
pub touchpurpose: TouchPurpose,
pub ime: Ime,
pub state: State,
Expand Down Expand Up @@ -222,7 +222,7 @@ impl Screen {
context_manager,
ime,
sugarloaf,
mouse: crate::Mouse::new(config.scroll.multiplier, config.scroll.divider),
mouse: Mouse::new(config.scroll.multiplier, config.scroll.divider),
touchpurpose: TouchPurpose::default(),
state,
bindings,
Expand Down Expand Up @@ -1212,20 +1212,20 @@ impl Screen {
}

#[inline]
pub fn render_assistant(&mut self, assistant: &router::assistant::Assistant) {
pub fn render_assistant(&mut self, assistant: &routes::assistant::Assistant) {
crate::router::assistant::screen(&mut self.sugarloaf, assistant);
self.sugarloaf.render();
}

#[inline]
pub fn render_welcome(&mut self) {
crate::router::welcome::screen(&mut self.sugarloaf);
crate::routes::welcome::screen(&mut self.sugarloaf);
self.sugarloaf.render();
}

#[inline]
pub fn render_dialog(&mut self, content: &str) {
crate::router::dialog::screen(&mut self.sugarloaf, content);
crate::routes::dialog::screen(&mut self.sugarloaf, content);
self.sugarloaf.render();
}

Expand Down
2 changes: 1 addition & 1 deletion frontends/rioterm/src/screen/touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use std::{collections::HashSet, mem};

use winit::event::{ElementState, MouseButton, Touch, TouchPhase};

use crate::bindings::FontSizeAction;
use crate::event::ClickState;
use crate::router::Route;
use crate::screen::bindings::FontSizeAction;

#[derive(Debug)]
pub enum TouchPurpose {
Expand Down
1 change: 1 addition & 0 deletions frontends/rioterm/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use rio_backend::config::colors::{
use rio_backend::config::Config;
use rio_backend::sugarloaf::core::{Sugar, SugarDecoration, SugarStack, SugarStyle};
use rio_backend::sugarloaf::{SugarGraphic, Sugarloaf};
#[cfg(target_os = "macos")]
use rio_backend::superloop::Superloop;
use std::collections::HashMap;
use std::time::{Duration, Instant};
Expand Down

0 comments on commit 7026b36

Please sign in to comment.