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:
parent
655eef271f
commit
0503abc63a
@ -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);
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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!?");
|
||||
|
Loading…
Reference in New Issue
Block a user