截图模块优化调整

This commit is contained in:
zhongluofeng
2026-08-03 17:36:07 +08:00
parent f51a7f894e
commit c913379e2b
19 changed files with 1744 additions and 300 deletions
+9 -6
View File
@@ -47,11 +47,11 @@ use process_manager::{
};
use screenshot::commands::{
screenshot_capture_fullscreen, screenshot_capture_window, screenshot_clear_fullscreen,
screenshot_copy_image, screenshot_crop_copy_stored, screenshot_crop_stored,
screenshot_cursor_pos, screenshot_disable_transitions, screenshot_enum_windows,
screenshot_fullscreen_png, screenshot_get_editor_image, screenshot_get_fullscreen_bmp,
screenshot_register_shortcut, screenshot_save_png, screenshot_set_editor_image,
screenshot_unregister_shortcut, screenshot_window_from_point,
screenshot_compose_copy, screenshot_copy_image, screenshot_crop_copy_stored,
screenshot_crop_stored, screenshot_cursor_pos, screenshot_disable_transitions,
screenshot_enum_windows, screenshot_fullscreen_png, screenshot_get_editor_image,
screenshot_get_fullscreen_bmp, screenshot_register_shortcut, screenshot_save_png,
screenshot_set_editor_image, screenshot_unregister_shortcut, screenshot_window_from_point,
};
use clipboard::{
ClipboardManager,
@@ -215,7 +215,8 @@ pub fn run() {
screenshot_save_png,
screenshot_register_shortcut,
screenshot_unregister_shortcut,
screenshot_disable_transitions
screenshot_disable_transitions,
screenshot_compose_copy
])
.setup(|app| {
// 初始化日志系统,日志目录: {app_data_dir}/logs/
@@ -280,6 +281,8 @@ pub fn run() {
if let Err(e) = clipboard::popup::register_shortcut(&app_handle, &shortcut) {
eprintln!("[clipboard] 快捷键注册失败: {}", e);
}
// 预创建弹窗窗口(隐藏),首次按快捷键时直接 show,避免首次创建时序问题
clipboard::popup::ensure_popup_window(&app_handle);
}
app.manage(clipboard);