aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock13
-rw-r--r--Cargo.toml4
-rw-r--r--ports/winit/Cargo.toml3
-rw-r--r--ports/winit/headed_window.rs9
4 files changed, 16 insertions, 13 deletions
diff --git a/Cargo.lock b/Cargo.lock
index d0cdaf14f78..2972d028ecb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5322,6 +5322,7 @@ dependencies = [
"libc",
"libservo",
"log",
+ "raw-window-handle 0.5.0",
"servo-media",
"shellwords",
"sig",
@@ -6049,9 +6050,9 @@ dependencies = [
[[package]]
name = "surfman"
-version = "0.6.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4ebdfa54ba49e91f713e232973ca44ac493aa98e6fbf1366772ffdf9b9ddb3f"
+checksum = "23cf77d20c00c8355323883b3ab476057430bd4c752c6b5cff4fabc9aa5786e9"
dependencies = [
"bitflags 1.3.2",
"cfg_aliases",
@@ -6079,9 +6080,9 @@ dependencies = [
[[package]]
name = "surfman-chains"
-version = "0.7.0"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b51e9d68bff975cc81ed92995691c9522c49a0531900b6548e7c5bbb8681cc79"
+checksum = "896f2c9668d2b6b1cc6634bcba84b6e80147c2c9243dfde6dedf782756f9a19c"
dependencies = [
"euclid",
"fnv",
@@ -7073,7 +7074,7 @@ dependencies = [
[[package]]
name = "webxr"
version = "0.0.1"
-source = "git+https://github.com/servo/webxr#a5824ed9674d60a507c8b8f8511cfdbbd68c92c6"
+source = "git+https://github.com/servo/webxr#8be0c295d966ad9334fc9ad828d966ac14b21eac"
dependencies = [
"android_injected_glue",
"bindgen",
@@ -7093,7 +7094,7 @@ dependencies = [
[[package]]
name = "webxr-api"
version = "0.0.1"
-source = "git+https://github.com/servo/webxr#a5824ed9674d60a507c8b8f8511cfdbbd68c92c6"
+source = "git+https://github.com/servo/webxr#8be0c295d966ad9334fc9ad828d966ac14b21eac"
dependencies = [
"euclid",
"ipc-channel",
diff --git a/Cargo.toml b/Cargo.toml
index 2d262b86eea..85c6e7cc8b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -67,8 +67,8 @@ smallvec = "1.9"
sparkle = "0.1.25"
string_cache = "0.8"
string_cache_codegen = "0.5"
-surfman = "0.6"
-surfman-chains = "0.7"
+surfman = "0.7"
+surfman-chains = "0.8"
surfman-chains-api = "0.2"
thin-slice = "0.1.0"
time = "0.1.41"
diff --git a/ports/winit/Cargo.toml b/ports/winit/Cargo.toml
index 9b24f5e6f2d..24bc533aa83 100644
--- a/ports/winit/Cargo.toml
+++ b/ports/winit/Cargo.toml
@@ -55,9 +55,10 @@ lazy_static = { workspace = true }
libc = { workspace = true }
libservo = { path = "../../components/servo" }
log = { workspace = true }
+raw-window-handle = "0.5"
servo-media = { git = "https://github.com/servo/media" }
shellwords = "1.0.0"
-surfman = { workspace = true, features = ["sm-winit", "sm-x11"] }
+surfman = { workspace = true, features = ["sm-x11", "sm-raw-window-handle"] }
tinyfiledialogs = "3.0"
webxr = { git = "https://github.com/servo/webxr", features = ["ipc", "glwindow", "headless"] }
winit = "0.28.3"
diff --git a/ports/winit/headed_window.rs b/ports/winit/headed_window.rs
index 75a2ac211ee..c39218bc5d7 100644
--- a/ports/winit/headed_window.rs
+++ b/ports/winit/headed_window.rs
@@ -14,7 +14,7 @@ use euclid::{
#[cfg(any(target_os = "linux", target_os = "windows"))]
use winit::window::Icon;
use winit::event::{ElementState, KeyboardInput, MouseButton, MouseScrollDelta, TouchPhase, VirtualKeyCode};
-
+use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};
use servo::keyboard_types::{Key, KeyState, KeyboardEvent};
use servo::compositing::windowing::{AnimationState, MouseWindowEvent, EmbedderEvent};
use servo::compositing::windowing::{EmbedderCoordinates, WindowMethods};
@@ -30,7 +30,6 @@ use servo::webrender_surfman::WebrenderSurfman;
use servo_media::player::context::{GlApi, GlContext as PlayerGLContext, NativeDisplay};
use std::cell::{Cell, RefCell};
use std::collections::HashMap;
-
use std::rc::Rc;
#[cfg(target_os = "linux")]
use surfman::platform::generic::multi::connection::NativeConnection;
@@ -125,13 +124,15 @@ impl Window {
let inner_size = Size2D::new(width, height);
// Initialize surfman
+ let display_handle = winit_window.raw_display_handle();
let connection =
- Connection::from_winit_window(&winit_window).expect("Failed to create connection");
+ Connection::from_raw_display_handle(display_handle).expect("Failed to create connection");
let adapter = connection
.create_adapter()
.expect("Failed to create adapter");
+ let window_handle = winit_window.raw_window_handle();
let native_widget = connection
- .create_native_widget_from_winit_window(&winit_window)
+ .create_native_widget_from_rwh(window_handle)
.expect("Failed to create native widget");
let surface_type = SurfaceType::Widget { native_widget };
let webrender_surfman = WebrenderSurfman::create(&connection, &adapter, surface_type)