better linux and mac fix

macos-click-through
keith 5 years ago
parent 1fa9127ef7
commit 08da104680

@ -19,13 +19,12 @@ use crate::INITIAL_DIMENSIONS;
#[folder = "assets/"]
struct Asset;
#[cfg(target_os = "windows")]
fn windows_fix_dpi() {
if cfg!(target_os = "windows") {
use winapi::um::winuser::SetProcessDpiAwarenessContext;
use winapi::shared::windef::DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2;
unsafe {
SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
}
use winapi::um::winuser::SetProcessDpiAwarenessContext;
use winapi::shared::windef::DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2;
unsafe {
SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
}
}
@ -61,6 +60,7 @@ pub fn ui_loop() {
// Icon::from_rgba(rgba, width, height).expect("Failed to create icon object")
// };
// info!("icon created");
#[cfg(target_os = "windows")]
windows_fix_dpi();
let mut window = video_subsystem.window("Neovide", logical_size.width, logical_size.height)

Loading…
Cancel
Save