1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 05:12:40 +03:00

fixup build on windows, make transparent

This commit is contained in:
Wez Furlong 2021-05-06 09:18:42 -07:00
parent 655eef271f
commit 0503abc63a
3 changed files with 7 additions and 5 deletions

View File

@ -9,5 +9,5 @@ fn vs_main([[builtin(vertex_index)]] in_vertex_index: u32) -> [[builtin(position
[[stage(fragment)]]
fn fs_main() -> [[location(0)]] vec4<f32> {
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
return vec4<f32>(0.4, 0.0, 0.8, 0.5);
}

View File

@ -30,7 +30,9 @@ impl MyWindow {
let instance = wgpu::Instance::new(if cfg!(target_os = "macos") {
wgpu::BackendBit::METAL
} else if cfg!(windows) {
wgpu::BackendBit::DX12
// Vulkan supports window opacity, but DX12 doesn't
wgpu::BackendBit::PRIMARY
// wgpu::BackendBit::DX12
} else {
wgpu::BackendBit::PRIMARY
});
@ -153,8 +155,8 @@ impl MyWindow {
ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(wgpu::Color {
r: 0.,
g: 1.,
b: 0.,
g: 0.,
b: 0.5,
a: 0.5,
}),
store: true,

View File

@ -549,7 +549,7 @@ impl WindowInner {
}
}
unsafe impl HasRawWindowHandle for WindowInner {
unsafe impl HasRawWindowHandle for Window {
fn raw_window_handle(&self) -> RawWindowHandle {
let conn = Connection::get().expect("raw_window_handle only callable on main thread");
let handle = conn.get_window(self.0).expect("window handle invalid!?");