空白点击不再点桌面(回收站): 只移动光标到客户区安全点

Browse Source
- install_safe_blank_click: auto.mouse_click_blank 改成只调 mouse_to_blank, mouse_to_blank 改成
  移到客户区 (12,12) 换算出的屏幕点; LCP_BLANK_CLICK=1 还原
- 必须在 driver_click_tasks 之后再装一次: 驱动代理会把 auto.mouse_click_blank 重绑回代理,
  第一次装在被覆盖, 20 分钟里仍有 391 次 点击客户区(1,1)
- tests: test_safe_blank_click 4 例

单测: 783 passed。
This commit is contained in:
Codex Agent
2026-11-22 10:54:48 +08:00
parent 08f86dc932
commit 00babd0c78
3 changed files with 123 additions and 1 deletions
+5 -1
View File
@@ -15,7 +15,7 @@ from .aalc_patches import (TaskAbort, WindowGuard, driver_click_tasks, headless_
install_back_button_result, install_default_battle_team, install_event_choices,
install_exact_team_match, install_gift_confirm_guard, install_gift_preference,
install_image_error_guard, install_key_hold, install_progress_watchdog,
install_rabbit_hole, install_robust_set_foreground, install_shop_audit, install_shop_by_name,
install_rabbit_hole, install_robust_set_foreground, install_safe_blank_click, install_shop_audit, install_shop_by_name,
install_system_team_selection, install_team_screen_guard,
install_theme_pack_audit, install_theme_pack_refresh_click, install_theme_pack_systems,
install_typed_keyboard_road, load_rabbit_hole, mirror_progress, stop_driver_click)
@@ -157,6 +157,7 @@ def _run(task, params):
if task in ('mirror', 'all'):
install_back_button_result(log=log) # 上游 V1.6.2 拿 click_element 返回的 True 当坐标, 首次引导页 TypeError
install_system_team_selection(log=log, names=rabbit['team_names'] if rabbit else None)
install_safe_blank_click(log=log) # 「点空白」不再点桌面(回收站)
install_team_screen_guard(log=log)
install_gift_confirm_guard(log=log) # 「获得E.G.O饰品」点不关时换落点/结束任务(ISSUES I-06)
install_image_error_guard(log=log) # 截图连续识别失败即结束任务(防窗口没了还空转)
@@ -179,6 +180,9 @@ def _run(task, params):
originals = apply_overrides(cfg, task, params, restore_path)
with driver_click_tasks(scheme, auto, screen, cfg, log=log), \
mirror_progress(scheme) as progress:
# 驱动代理是这里才装的(会把 auto.mouse_click_blank 重新绑到代理上),
# 所以空白点击补丁要再装一次,否则被覆盖回「点 (1,1)」→ 点到桌面回收站。
install_safe_blank_click(log=log)
try:
if task == 'all':
with headless_hdr_warning(scheme, log=log):