aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2024-06-08 13:48:31 +0300
committerKirill Chibisov <contact@kchibisov.com>2024-06-08 15:13:16 +0300
commit69c485527c42a9c77bf7c4237d923ee6015c30f6 (patch)
treeebc9c1893be65df845d67548bc16823e9c6444a7
parentcacdb5bb3b72bad2c729227537979d95af75978f (diff)
downloadalacritty-bump-glutin-0320.tar.gz
alacritty-bump-glutin-0320.zip
Bump glutin to 0.32.0bump-glutin-0320
-rw-r--r--Cargo.lock110
-rw-r--r--alacritty/Cargo.toml5
-rw-r--r--alacritty/src/clipboard.rs4
-rw-r--r--alacritty/src/display/mod.rs2
-rw-r--r--alacritty/src/display/window.rs20
-rw-r--r--alacritty/src/event.rs4
-rw-r--r--alacritty/src/main.rs9
-rw-r--r--alacritty/src/renderer/platform.rs2
-rw-r--r--alacritty/src/window_context.rs4
9 files changed, 56 insertions, 104 deletions
diff --git a/Cargo.lock b/Cargo.lock
index f73c36a9..713a3080 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -55,7 +55,6 @@ dependencies = [
"objc",
"parking_lot",
"png",
- "raw-window-handle",
"serde",
"serde_json",
"serde_yaml",
@@ -245,31 +244,12 @@ 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"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
-
-[[package]]
-name = "cfg_aliases"
-version = "0.2.0"
+version = "0.2.1"
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",
]
@@ -908,17 +883,6 @@ dependencies = [
]
[[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"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -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]]
@@ -1248,22 +1212,12 @@ 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"
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,19 +1238,13 @@ 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"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88658da63e4cc2c8adb1262902cd6af51094df0488b760d6fd27194269c0950a"
@@ -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",
diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml
index 10ee1aee..947f3ea1 100644
--- a/alacritty/Cargo.toml
+++ b/alacritty/Cargo.toml
@@ -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"
diff --git a/alacritty/src/clipboard.rs b/alacritty/src/clipboard.rs
index bb90a13d..7853de47 100644
--- a/alacritty/src/clipboard.rs
+++ b/alacritty/src/clipboard.rs
@@ -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(),
diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs
index 4dafa80f..1841b167 100644
--- a/alacritty/src/display/mod.rs
+++ b/alacritty/src/display/mod.rs
@@ -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};
diff --git a/alacritty/src/display/window.rs b/alacritty/src/display/window.rs
index 09793fa0..da5d85bc 100644
--- a/alacritty/src/display/window.rs
+++ b/alacritty/src/display/window.rs
@@ -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)];
}
}
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index b9bf3030..8da758df 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -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,
diff --git a/alacritty/src/main.rs b/alacritty/src/main.rs
index 2951c224..6219dd78 100644
--- a/alacritty/src/main.rs
+++ b/alacritty/src/main.rs
@@ -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"
diff --git a/alacritty/src/renderer/platform.rs b/alacritty/src/renderer/platform.rs
index 3568bd20..87ed29c2 100644
--- a/alacritty/src/renderer/platform.rs
+++ b/alacritty/src/renderer/platform.rs
@@ -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(
diff --git a/alacritty/src/window_context.rs b/alacritty/src/window_context.rs
index f5fb5cc5..062f9ef0 100644
--- a/alacritty/src/window_context.rs
+++ b/alacritty/src/window_context.rs
@@ -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);