mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
Bump glutin to 0.32.0
This commit is contained in:
parent
cacdb5bb3b
commit
64ba0b8e91
9 changed files with 56 additions and 104 deletions
110
Cargo.lock
generated
110
Cargo.lock
generated
|
@ -55,7 +55,6 @@ dependencies = [
|
|||
"objc",
|
||||
"parking_lot",
|
||||
"png",
|
||||
"raw-window-handle",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_yaml",
|
||||
|
@ -244,32 +243,13 @@ version = "0.1.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
|
||||
|
||||
[[package]]
|
||||
name = "block-sys"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7"
|
||||
dependencies = [
|
||||
"objc-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block2"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68"
|
||||
dependencies = [
|
||||
"block-sys",
|
||||
"objc2 0.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block2"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43ff7d91d3c1d568065b06c899777d1e48dcf76103a672a0adbc238a7f247f1e"
|
||||
dependencies = [
|
||||
"objc2 0.5.1",
|
||||
"objc2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -340,15 +320,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||
|
||||
[[package]]
|
||||
name = "cfg_aliases"
|
||||
version = "0.1.1"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
|
||||
|
||||
[[package]]
|
||||
name = "cfg_aliases"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f"
|
||||
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
||||
|
||||
[[package]]
|
||||
name = "cgl"
|
||||
|
@ -835,43 +809,44 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glutin"
|
||||
version = "0.31.3"
|
||||
version = "0.32.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "18fcd4ae4e86d991ad1300b8f57166e5be0c95ef1f63f3f5b827f8a164548746"
|
||||
checksum = "2491aa3090f682ddd920b184491844440fdd14379c7eef8f5bc10ef7fb3242fd"
|
||||
dependencies = [
|
||||
"bitflags 2.4.2",
|
||||
"cfg_aliases 0.1.1",
|
||||
"cfg_aliases",
|
||||
"cgl",
|
||||
"core-foundation",
|
||||
"dispatch",
|
||||
"glutin_egl_sys",
|
||||
"glutin_glx_sys",
|
||||
"glutin_wgl_sys",
|
||||
"icrate",
|
||||
"libloading",
|
||||
"objc2 0.4.1",
|
||||
"objc2",
|
||||
"objc2-app-kit",
|
||||
"objc2-foundation",
|
||||
"once_cell",
|
||||
"raw-window-handle",
|
||||
"wayland-sys",
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.52.0",
|
||||
"x11-dl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glutin_egl_sys"
|
||||
version = "0.6.0"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77cc5623f5309ef433c3dd4ca1223195347fe62c413da8e2fdd0eb76db2d9bcd"
|
||||
checksum = "cae99fff4d2850dbe6fb8c1fa8e4fead5525bab715beaacfccf3fb994e01c827"
|
||||
dependencies = [
|
||||
"gl_generator",
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glutin_glx_sys"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f"
|
||||
checksum = "9c2b2d3918e76e18e08796b55eb64e8fe6ec67d5a6b2e2a7e2edce224ad24c63"
|
||||
dependencies = [
|
||||
"gl_generator",
|
||||
"x11-dl",
|
||||
|
@ -879,9 +854,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glutin_wgl_sys"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead"
|
||||
checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c"
|
||||
dependencies = [
|
||||
"gl_generator",
|
||||
]
|
||||
|
@ -907,17 +882,6 @@ dependencies = [
|
|||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icrate"
|
||||
version = "0.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319"
|
||||
dependencies = [
|
||||
"block2 0.3.0",
|
||||
"dispatch",
|
||||
"objc2 0.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.2.5"
|
||||
|
@ -1045,7 +1009,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.48.5",
|
||||
"windows-targets 0.52.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1246,16 +1210,6 @@ version = "0.3.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60"
|
||||
|
||||
[[package]]
|
||||
name = "objc2"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d"
|
||||
dependencies = [
|
||||
"objc-sys",
|
||||
"objc2-encode 3.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2"
|
||||
version = "0.5.1"
|
||||
|
@ -1263,7 +1217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "b4b25e1034d0e636cd84707ccdaa9f81243d399196b8a773946dcffec0401659"
|
||||
dependencies = [
|
||||
"objc-sys",
|
||||
"objc2-encode 4.0.1",
|
||||
"objc2-encode",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1272,8 +1226,8 @@ version = "0.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb79768a710a9a1798848179edb186d1af7e8a8679f369e4b8d201dd2a034047"
|
||||
dependencies = [
|
||||
"block2 0.5.0",
|
||||
"objc2 0.5.1",
|
||||
"block2",
|
||||
"objc2",
|
||||
"objc2-core-data",
|
||||
"objc2-foundation",
|
||||
]
|
||||
|
@ -1284,17 +1238,11 @@ version = "0.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e092bc42eaf30a08844e6a076938c60751225ec81431ab89f5d1ccd9f958d6c"
|
||||
dependencies = [
|
||||
"block2 0.5.0",
|
||||
"objc2 0.5.1",
|
||||
"block2",
|
||||
"objc2",
|
||||
"objc2-foundation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-encode"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666"
|
||||
|
||||
[[package]]
|
||||
name = "objc2-encode"
|
||||
version = "4.0.1"
|
||||
|
@ -1307,9 +1255,9 @@ version = "0.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cfaefe14254871ea16c7d88968c0ff14ba554712a20d76421eec52f0a7fb8904"
|
||||
dependencies = [
|
||||
"block2 0.5.0",
|
||||
"block2",
|
||||
"dispatch",
|
||||
"objc2 0.5.1",
|
||||
"objc2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1479,9 +1427,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "raw-window-handle"
|
||||
version = "0.5.2"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9"
|
||||
checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
|
@ -2414,7 +2362,7 @@ dependencies = [
|
|||
"bitflags 2.4.2",
|
||||
"bytemuck",
|
||||
"calloop",
|
||||
"cfg_aliases 0.2.0",
|
||||
"cfg_aliases",
|
||||
"concurrent-queue",
|
||||
"core-foundation",
|
||||
"core-graphics",
|
||||
|
@ -2424,7 +2372,7 @@ dependencies = [
|
|||
"libc",
|
||||
"memmap2",
|
||||
"ndk",
|
||||
"objc2 0.5.1",
|
||||
"objc2",
|
||||
"objc2-app-kit",
|
||||
"objc2-foundation",
|
||||
"orbclient",
|
||||
|
|
|
@ -28,19 +28,18 @@ bitflags = "2.2.1"
|
|||
clap = { version = "4.2.7", features = ["derive", "env"] }
|
||||
copypasta = { version = "0.10.1", default-features = false }
|
||||
crossfont = "0.8.0"
|
||||
glutin = { version = "0.31.1", default-features = false, features = ["egl", "wgl"] }
|
||||
glutin = { version = "0.32.0", default-features = false, features = ["egl", "wgl"] }
|
||||
home = "0.5.5"
|
||||
libc = "0.2"
|
||||
log = { version = "0.4", features = ["std", "serde"] }
|
||||
notify = "6.1.1"
|
||||
parking_lot = "0.12.0"
|
||||
raw-window-handle = "0.5"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
serde_yaml = "0.9.25"
|
||||
toml = "0.8.2"
|
||||
unicode-width = "0.1"
|
||||
winit = { version = "0.30.0", default-features = false, features = ["rwh_05", "serde"] }
|
||||
winit = { version = "0.30.0", default-features = false, features = ["rwh_06", "serde"] }
|
||||
|
||||
[build-dependencies]
|
||||
gl_generator = "0.14.0"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use log::{debug, warn};
|
||||
use raw_window_handle::RawDisplayHandle;
|
||||
use winit::raw_window_handle::RawDisplayHandle;
|
||||
|
||||
use alacritty_terminal::term::ClipboardType;
|
||||
|
||||
|
@ -23,7 +23,7 @@ impl Clipboard {
|
|||
#[cfg(all(feature = "wayland", not(any(target_os = "macos", windows))))]
|
||||
RawDisplayHandle::Wayland(display) => {
|
||||
let (selection, clipboard) =
|
||||
wayland_clipboard::create_clipboards_from_external(display.display);
|
||||
wayland_clipboard::create_clipboards_from_external(display.display.as_ptr());
|
||||
Self { clipboard: Box::new(clipboard), selection: Some(Box::new(selection)) }
|
||||
},
|
||||
_ => Self::default(),
|
||||
|
|
|
@ -14,10 +14,10 @@ use glutin::surface::{Surface, SwapInterval, WindowSurface};
|
|||
|
||||
use log::{debug, info};
|
||||
use parking_lot::MutexGuard;
|
||||
use raw_window_handle::RawWindowHandle;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use winit::dpi::PhysicalSize;
|
||||
use winit::keyboard::ModifiersState;
|
||||
use winit::raw_window_handle::RawWindowHandle;
|
||||
use winit::window::CursorIcon;
|
||||
|
||||
use crossfont::{Rasterize, Rasterizer, Size as FontSize};
|
||||
|
|
|
@ -26,12 +26,12 @@ use {
|
|||
winit::platform::macos::{OptionAsAlt, WindowAttributesExtMacOS, WindowExtMacOS},
|
||||
};
|
||||
|
||||
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle};
|
||||
use winit::dpi::{PhysicalPosition, PhysicalSize};
|
||||
use winit::event_loop::ActiveEventLoop;
|
||||
use winit::monitor::MonitorHandle;
|
||||
#[cfg(windows)]
|
||||
use winit::platform::windows::IconExtWindows;
|
||||
use winit::raw_window_handle::{HasWindowHandle, RawWindowHandle};
|
||||
use winit::window::{
|
||||
CursorIcon, Fullscreen, ImePurpose, Theme, UserAttentionType, Window as WinitWindow,
|
||||
WindowAttributes, WindowId,
|
||||
|
@ -190,7 +190,7 @@ impl Window {
|
|||
|
||||
let scale_factor = window.scale_factor();
|
||||
log::info!("Window scale factor: {}", scale_factor);
|
||||
let is_x11 = matches!(window.raw_window_handle(), RawWindowHandle::Xlib(_));
|
||||
let is_x11 = matches!(window.window_handle().unwrap().as_raw(), RawWindowHandle::Xlib(_));
|
||||
|
||||
Ok(Self {
|
||||
requested_redraw: false,
|
||||
|
@ -206,7 +206,7 @@ impl Window {
|
|||
|
||||
#[inline]
|
||||
pub fn raw_window_handle(&self) -> RawWindowHandle {
|
||||
self.window.raw_window_handle()
|
||||
self.window.window_handle().unwrap().as_raw()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -444,14 +444,15 @@ impl Window {
|
|||
/// This prevents rendering artifacts from showing up when the window is transparent.
|
||||
#[cfg(target_os = "macos")]
|
||||
pub fn set_has_shadow(&self, has_shadows: bool) {
|
||||
let raw_window = match self.raw_window_handle() {
|
||||
RawWindowHandle::AppKit(handle) => handle.ns_window as id,
|
||||
let ns_view = match self.raw_window_handle() {
|
||||
RawWindowHandle::AppKit(handle) => handle.ns_view.as_ptr() as id,
|
||||
_ => return,
|
||||
};
|
||||
|
||||
let value = if has_shadows { YES } else { NO };
|
||||
unsafe {
|
||||
let _: id = msg_send![raw_window, setHasShadow: value];
|
||||
let ns_window: id = msg_send![ns_view, window];
|
||||
let _: id = msg_send![ns_window, setHasShadow: value];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -487,12 +488,13 @@ impl Window {
|
|||
|
||||
#[cfg(target_os = "macos")]
|
||||
fn use_srgb_color_space(window: &WinitWindow) {
|
||||
let raw_window = match window.raw_window_handle() {
|
||||
RawWindowHandle::AppKit(handle) => handle.ns_window as id,
|
||||
let ns_view = match window.window_handle().unwrap().as_raw() {
|
||||
RawWindowHandle::AppKit(handle) => handle.ns_view.as_ptr() as id,
|
||||
_ => return,
|
||||
};
|
||||
|
||||
unsafe {
|
||||
let _: () = msg_send![raw_window, setColorSpace: NSColorSpace::sRGBColorSpace(nil)];
|
||||
let ns_window: id = msg_send![ns_view, window];
|
||||
let _: () = msg_send![ns_window, setColorSpace: NSColorSpace::sRGBColorSpace(nil)];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,13 +17,13 @@ use ahash::RandomState;
|
|||
use crossfont::Size as FontSize;
|
||||
use glutin::display::{Display as GlutinDisplay, GetGlDisplay};
|
||||
use log::{debug, error, info, warn};
|
||||
use raw_window_handle::HasRawDisplayHandle;
|
||||
use winit::application::ApplicationHandler;
|
||||
use winit::event::{
|
||||
ElementState, Event as WinitEvent, Ime, Modifiers, MouseButton, StartCause,
|
||||
Touch as TouchEvent, WindowEvent,
|
||||
};
|
||||
use winit::event_loop::{ActiveEventLoop, ControlFlow, DeviceEvents, EventLoop, EventLoopProxy};
|
||||
use winit::raw_window_handle::HasDisplayHandle;
|
||||
use winit::window::WindowId;
|
||||
|
||||
use alacritty_terminal::event::{Event as TerminalEvent, EventListener, Notify};
|
||||
|
@ -99,7 +99,7 @@ impl Processor {
|
|||
|
||||
// SAFETY: Since this takes a pointer to the winit event loop, it MUST be dropped first,
|
||||
// which is done in `loop_exiting`.
|
||||
let clipboard = unsafe { Clipboard::new(event_loop.raw_display_handle()) };
|
||||
let clipboard = unsafe { Clipboard::new(event_loop.display_handle().unwrap().as_raw()) };
|
||||
|
||||
Processor {
|
||||
initial_window_options,
|
||||
|
|
|
@ -19,11 +19,11 @@ use std::path::PathBuf;
|
|||
use std::{env, fs};
|
||||
|
||||
use log::info;
|
||||
#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
|
||||
use raw_window_handle::{HasRawDisplayHandle, RawDisplayHandle};
|
||||
#[cfg(windows)]
|
||||
use windows_sys::Win32::System::Console::{AttachConsole, FreeConsole, ATTACH_PARENT_PROCESS};
|
||||
use winit::event_loop::EventLoop;
|
||||
#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
|
||||
use winit::raw_window_handle::{HasDisplayHandle, RawDisplayHandle};
|
||||
|
||||
use alacritty_terminal::tty;
|
||||
|
||||
|
@ -137,7 +137,10 @@ fn alacritty(mut options: Options) -> Result<(), Box<dyn Error>> {
|
|||
#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
|
||||
info!(
|
||||
"Running on {}",
|
||||
if matches!(window_event_loop.raw_display_handle(), RawDisplayHandle::Wayland(_)) {
|
||||
if matches!(
|
||||
window_event_loop.display_handle().unwrap().as_raw(),
|
||||
RawDisplayHandle::Wayland(_)
|
||||
) {
|
||||
"Wayland"
|
||||
} else {
|
||||
"X11"
|
||||
|
|
|
@ -12,10 +12,10 @@ use glutin::prelude::*;
|
|||
use glutin::surface::{Surface, SurfaceAttributesBuilder, WindowSurface};
|
||||
use log::{debug, LevelFilter};
|
||||
|
||||
use raw_window_handle::{RawDisplayHandle, RawWindowHandle};
|
||||
use winit::dpi::PhysicalSize;
|
||||
#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
|
||||
use winit::platform::x11;
|
||||
use winit::raw_window_handle::{RawDisplayHandle, RawWindowHandle};
|
||||
|
||||
/// Create the GL display.
|
||||
pub fn create_gl_display(
|
||||
|
|
|
@ -14,10 +14,10 @@ use glutin::display::GetGlDisplay;
|
|||
#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
|
||||
use glutin::platform::x11::X11GlConfigExt;
|
||||
use log::info;
|
||||
use raw_window_handle::HasRawDisplayHandle;
|
||||
use serde_json as json;
|
||||
use winit::event::{Event as WinitEvent, Modifiers, WindowEvent};
|
||||
use winit::event_loop::{ActiveEventLoop, EventLoopProxy};
|
||||
use winit::raw_window_handle::HasDisplayHandle;
|
||||
use winit::window::WindowId;
|
||||
|
||||
use alacritty_terminal::event::Event as TerminalEvent;
|
||||
|
@ -75,7 +75,7 @@ impl WindowContext {
|
|||
config: Rc<UiConfig>,
|
||||
options: WindowOptions,
|
||||
) -> Result<Self, Box<dyn Error>> {
|
||||
let raw_display_handle = event_loop.raw_display_handle();
|
||||
let raw_display_handle = event_loop.display_handle().unwrap().as_raw();
|
||||
|
||||
let mut identity = config.window.identity.clone();
|
||||
options.window_identity.override_identity_config(&mut identity);
|
||||
|
|
Loading…
Reference in a new issue