截图模块优化调整
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user