feat:游戏启动自动置顶+聚焦
Some checks failed
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Some checks failed
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
This commit is contained in:
@ -354,7 +354,7 @@ unsafe extern "system" fn maximize_if_owned_by_process(
|
||||
_: windows::Win32::Foundation::LPARAM,
|
||||
) -> windows::core::BOOL {
|
||||
use windows::Win32::UI::WindowsAndMessaging::{
|
||||
GetWindowThreadProcessId, IsWindowVisible, SW_MAXIMIZE, ShowWindow,
|
||||
GetWindowThreadProcessId, IsWindowVisible, SW_MAXIMIZE, SetForegroundWindow, ShowWindow,
|
||||
};
|
||||
use windows::core::BOOL;
|
||||
|
||||
@ -363,6 +363,7 @@ unsafe extern "system" fn maximize_if_owned_by_process(
|
||||
if window_pid == MAXIMIZE_PROCESS_ID.load(Ordering::Relaxed)
|
||||
&& unsafe { IsWindowVisible(hwnd).as_bool() }
|
||||
{
|
||||
let _ = unsafe { SetForegroundWindow(hwnd) };
|
||||
let _ = unsafe { ShowWindow(hwnd, SW_MAXIMIZE) };
|
||||
MAXIMIZE_WINDOW_FOUND.store(true, Ordering::Relaxed);
|
||||
return BOOL(0);
|
||||
|
||||
Reference in New Issue
Block a user