Skip to content

Commit

Permalink
fix(windows): increase kanata's process priority
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo committed Jun 7, 2023
1 parent f28384d commit f97e1d5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/kanata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,15 @@ impl Kanata {
}
}

#[cfg(target_os = "windows")]
unsafe {
log::info!("Asking Windows to increase process priority");
winapi::um::processthreadsapi::SetPriorityClass(
winapi::um::processthreadsapi::GetCurrentProcess(),
winapi::um::winbase::HIGH_PRIORITY_CLASS,
);
}

update_kbd_out(&cfg.items, &kbd_out)?;
set_altgr_behaviour(&cfg)?;

Expand Down

0 comments on commit f97e1d5

Please sign in to comment.