winit_manager: set app_id for wayland

This commit is contained in:
Alex Janka 2024-08-19 14:15:06 +10:00
parent bf3a651f95
commit 90d6d38625

View file

@ -16,6 +16,8 @@ use gb_emu_lib::{
use gilrs::{Button, Gilrs}; use gilrs::{Button, Gilrs};
use image::ImageBuffer; use image::ImageBuffer;
use raw_window_handle::HasDisplayHandle; use raw_window_handle::HasDisplayHandle;
#[cfg(target_os = "linux")]
use winit::platform::wayland::WindowBuilderExtWayland;
use winit::{ use winit::{
dpi::PhysicalSize, dpi::PhysicalSize,
event::{Event, WindowEvent}, event::{Event, WindowEvent},
@ -337,8 +339,10 @@ where
) -> anyhow::Result<(Self, RendererChannel)> { ) -> anyhow::Result<(Self, RendererChannel)> {
let window = WindowBuilder::new() let window = WindowBuilder::new()
.with_title("Gameboy") .with_title("Gameboy")
.with_resizable(resizable) .with_resizable(resizable);
.build(event_loop)?; #[cfg(target_os = "linux")]
let window = window.with_name("TWINC", "");
let window = window.build(event_loop)?;
let real_factor = (window.scale_factor() * factor as f64) as u32; let real_factor = (window.scale_factor() * factor as f64) as u32;
let inner_size = window.inner_size(); let inner_size = window.inner_size();