team-ljyzipelo

공개

Wayland에서 목록 항목을 창 밖으로 끌어 놓아 풀기

- 선택한 행을 끌면 wl_data_device로 운영체제 끌기를 시작하고 선택 항목을 임시 폴더에 풂
- 받는 쪽에는 text/uri-list와 샌드박스 앱용 문서 포털 전송 키를 넘김
- 놓지 않고 취소하면 풀던 작업을 취소하며 결과 창을 띄우지 않음
- winit이 끌기 시작을 지원하지 않아 같은 Wayland 연결에 별도 큐와 포인터를 둠

Co-Authored-By: Claude Opus 5.5 <[email protected]>
작성자
LeeJunyoung
작성 시각
커밋
485ace452e41881436d51421dd755e31f7d85624
부모
28ce187
이 시점의 파일 보기

변경된 파일 11개

+834-9
수정README.md+1-0
@@ -64,6 +64,7 @@ main `3a77cfd`는 Windows 11 Pro build 26300과 Ubuntu 26.04.1 Wayland/X11에서
6464
6565- **찾기:** 압축파일을 연 뒤 Ctrl+F를 누르면 지금 보고 있는 폴더 아래의 모든 하위 폴더에서 이름으로 찾고, Ctrl+Shift+F를 누르면 압축파일 전체 경로에서 찾습니다. 찾기 창의 결과를 두 번 누르거나 Enter를 누르면 그 위치로 이동합니다.
6666- **Esc:** 찾기 창, 작업 결과 창, 압축 파일 만들기 창 등 자식 창이 떠 있으면 그 창을 닫고, 아무 창도 없으면 프로그램을 종료합니다. 진행 중인 작업 창은 [취소] 버튼을 사용합니다.
67추가: - **끌어서 풀기(Ubuntu Wayland):** 목록에서 고른 파일과 폴더를 누른 채 창 밖으로 끌어 파일 관리자나 브라우저의 파일 올리기 영역에 놓으면, 압축파일 옆 Zipelo 임시 폴더에 풀린 뒤 받는 프로그램으로 넘어갑니다. 파일 관리자의 폴더 위에 놓으면 그 폴더 안에, 빈 곳에 놓으면 열린 폴더에 복사되며 이름이 겹칠 때의 처리(바꾸기, 건너뛰기, 이름 바꾸기)는 받는 프로그램이 정합니다. 스냅·Flatpak 앱에는 문서 포털로 넘깁니다. 임시 폴더는 Zipelo를 닫을 때 지웁니다. X11과 Windows에서는 아직 지원하지 않습니다.
6768- **폴더 크기:** 목록의 폴더 크기를 0 B가 아닌, 안에 든 모든 파일 크기의 합으로 표시합니다.
6869- **로그:** 배포 빌드는 오류만 표준 오류에 남깁니다. 디버그 빌드는 작업 요청과 작업자 응답까지 자세히 남깁니다. 문제를 조사할 때는 `ZIPELO_LOG=debug zipelo`처럼 `ZIPELO_LOG`(off, error, warn, info, debug, trace)로 단계를 바꿀 수 있습니다. 암호는 어느 단계에서도 남기지 않습니다.
6970
수정docs/ui-scenario-guide.md+4-0
@@ -92,6 +92,10 @@ cargo +1.99.1 build --locked --manifest-path experiments/rust-ui-memory-app/Carg
9292- uninstall-ubuntu-missing: 이전 앱이 없어 복원하지 못한 경우의 터미널 안내 문구를 확인한다.
9393- uninstall-ubuntu-unknown-user: 제거 사용자를 확인하지 못해 설정을 유지하는 안내 문구를 확인한다.
9494
95추가: ## 창 밖으로 끌어서 풀기
96추가:
97추가: Wayland에서 목록의 행을 누른 채 끌면 운영체제 끌어 놓기를 시작합니다. 선택하지 않은 행을 끌면 그 행만 선택합니다. 새 창, 버튼이나 문구는 없으며 풀기 진행 중에는 기존 작업 창이 보이고, 끝나면 결과 창 없이 받는 프로그램이 파일을 가져갑니다. 놓지 않고 취소하면 풀던 작업을 취소하며 취소 결과 창도 띄우지 않습니다. 화면 변화가 없으므로 상황은 추가하지 않았고, 흐름은 tests/rust-app-ui/drag_out_flow.rs의 가짜 끌기 구현으로 확인합니다. 실제 파일 관리자와 브라우저에 놓기는 Ubuntu Wayland 실기로 확인합니다. X11과 Windows에서는 행을 끌어도 아무 동작을 하지 않습니다.
98추가:
9599## Esc 키
96100
97101자식 창(찾기 창, 작업 결과 창, 압축 파일 만들기 창, 미리보기, 암호 입력, 큰 작업 승인, 파일 충돌 선택, 종료 확인 등)이 떠 있으면 Esc는 그 창을 닫거나 취소합니다. 진행 중인 작업 창은 Esc로 닫지 않으며 [취소] 버튼을 사용합니다. 목록에 선택한 항목이 있으면 Esc는 먼저 선택을 해제하고, 입력란에 초점이 있으면 초점만 해제합니다. 아무 자식 창도 없으면 Esc로 프로그램을 종료하며, 작업 중이면 기존 종료 확인 창을 거칩니다. 미리보기 상황은 입력을 받지 않으므로 Esc 동작은 tests/rust-app-ui/explorer_selection.rs와 실제 실행으로 확인합니다.
수정experiments/rust-ui-memory-app/Cargo.lock+3-0
@@ -4630,8 +4630,11 @@ dependencies = [
46304630 "ashpd",
46314631 "eframe",
46324632 "pollster 0.4.0",
4633추가: "raw-window-handle",
46334634 "rfd",
46344635 "sha2 0.10.9",
4636추가: "wayland-backend",
4637추가: "wayland-client",
46354638 "wgpu",
46364639 "zipelo-archive-worker",
46374640]
수정experiments/rust-ui-memory-app/Cargo.toml+5-1
@@ -14,7 +14,7 @@ doctest = false
1414
1515[features]
1616default = []
17삭제: ui = ["dep:eframe", "dep:wgpu", "dep:rfd", "dep:ashpd", "dep:pollster"]
17추가: ui = ["dep:eframe", "dep:wgpu", "dep:rfd", "dep:ashpd", "dep:pollster", "dep:wayland-client", "dep:wayland-backend", "dep:raw-window-handle"]
1818ui-fixture = ["ui"]
1919
2020[dependencies]
@@ -42,6 +42,10 @@ path = "../../tests/rust-app-real-worker/formats.rs"
4242[target.'cfg(target_os = "linux")'.dependencies]
4343ashpd = { version = "=0.11.1", optional = true, default-features = false, features = ["async-std"] }
4444pollster = { version = "=0.4.0", optional = true }
45추가: # 창 밖으로 끌어 놓기(Wayland wl_data_device). eframe/winit이 이미 쓰는 같은 버전을 씀.
46추가: wayland-client = { version = "=0.31.15", optional = true }
47추가: wayland-backend = { version = "=0.3.17", optional = true, features = ["client_system"] }
48추가: raw-window-handle = { version = "=0.6.2", optional = true }
4549rfd = { version = "=0.16.0", optional = true, default-features = false, features = ["xdg-portal", "async-std"] }
4650
4751[target.'cfg(not(target_os = "linux"))'.dependencies]
수정experiments/rust-ui-memory-app/src/archive_screen.rs+151-8
@@ -202,6 +202,8 @@ struct OpenRequest {
202202 name: String,
203203 destination: PathBuf,
204204 automatic: bool,
205추가: /// 창 밖으로 끌어 놓으려고 푸는 경우, 받는 쪽에 넘길 항목(압축파일 안 경로).
206추가: drag: Option<Vec<String>>,
205207}
206208
207209/// 찾기 창(Ctrl+F, Ctrl+Shift+F) 크기. 검색어 입력란 아래로 결과 목록이 길게 이어지는
@@ -315,6 +317,10 @@ pub struct ArchiveApp {
315317 open_roots: Vec<(PathBuf, present::OpenRoot)>,
316318 open_count: u64,
317319 opener: Opener,
320추가: /// 운영체제 끌어 놓기 구현. 지원하지 않는 환경에서는 없음.
321추가: drag_out: Option<Box<dyn crate::drag_out::DragOut>>,
322추가: /// 끌기를 놓지 않고 취소해 풀던 작업을 취소했는지. 결과 창을 띄우지 않음.
323추가: drag_cancelled: bool,
318324 find: FindState,
319325 /// 이번 화면에서 목록 선택 해제 등 다른 곳이 Esc를 이미 처리했는지.
320326 escape_handled: bool,
@@ -398,6 +404,8 @@ impl ArchiveApp {
398404 open_roots: Vec::new(),
399405 open_count: 0,
400406 opener: Box::new(present::open_with_default),
407추가: drag_out: None,
408추가: drag_cancelled: false,
401409 find: FindState::default(),
402410 escape_handled: false,
403411 focus_list: false,
@@ -450,9 +458,30 @@ impl ArchiveApp {
450458 self.ui_error = Some(present::open_blocked_text(&name));
451459 return false;
452460 }
453삭제: let Some(archive) = self.model.archive.clone() else {
461추가: let Some(folder) = self.new_open_folder() else {
454462 return false;
455463 };
464추가: let request = OpenRequest {
465추가: folder: folder.clone(),
466추가: name: name.replace('\\', "/"),
467추가: destination: std::mem::replace(&mut self.destination, folder),
468추가: automatic: std::mem::replace(&mut self.automatic_destination, true),
469추가: drag: None,
470추가: };
471추가: self.opening = Some(request);
472추가: if self.extract_selection(Selection::EntryIds(vec![entry_id])) {
473추가: self.last_open = Some(entry_id);
474추가: true
475추가: } else {
476추가: self.finish_open(false);
477추가: false
478추가: }
479추가: }
480추가:
481추가: /// 압축파일별 임시 폴더 아래에 이번 열기(또는 끌어 놓기)용 새 하위 폴더 경로를 정함.
482추가: /// 같은 파일을 여러 번 열어도 충돌하지 않도록 매번 새 하위 폴더에 풂.
483추가: fn new_open_folder(&mut self) -> Option<PathBuf> {
484추가: let archive = self.model.archive.clone()?;
456485 let root = match self.open_roots.iter().find(|(a, _)| *a == archive) {
457486 Some((_, root)) if root.is_current() => root.path().to_path_buf(),
458487 _ => match present::create_open_root(&archive) {
@@ -465,22 +494,79 @@ impl ArchiveApp {
465494 Err(_) => {
466495 self.dismissed = false;
467496 self.ui_error = Some(present::FOLDER_ERROR.into());
468삭제: return false;
497추가: return None;
469498 }
470499 },
471500 };
472삭제: // 같은 파일을 여러 번 열어도 충돌하지 않도록 열 때마다 새 하위 폴더에 풂.
473501 self.open_count += 1;
474삭제: let folder = present::unique_folder(&root.join(self.open_count.to_string()));
502추가: Some(present::unique_folder(
503추가: &root.join(self.open_count.to_string()),
504추가: ))
505추가: }
506추가:
507추가: /// 운영체제 끌어 놓기 구현을 정함. Wayland처럼 지원하는 환경에서만 씀.
508추가: pub fn set_drag_out(&mut self, drag_out: Box<dyn crate::drag_out::DragOut>) {
509추가: self.drag_out = Some(drag_out);
510추가: }
511추가:
512추가: /// 목록에서 선택한 항목을 창 밖으로 끌기 시작함. 운영체제 끌기를 시작한 뒤 선택
513추가: /// 항목을 임시 폴더에 풀고, 다 풀리면 받는 쪽에 파일 경로를 넘김.
514추가: pub fn begin_drag_out(&mut self) -> bool {
515추가: self.release_open();
516추가: if self.drag_out.is_none()
517추가: || !self.model.can_extract()
518추가: || self.opening.is_some()
519추가: || self.model.selected.is_empty()
520추가: {
521추가: return false;
522추가: }
523추가: let gzip = self
524추가: .model
525추가: .list_id
526추가: .as_ref()
527추가: .is_some_and(|id| id.format == Format::Gzip);
528추가: let names: Vec<String> = if gzip {
529추가: vec![self.gzip_name.clone()]
530추가: } else {
531추가: browser::rows(&self.model.entries, &self.folder, &self.search)
532추가: .into_iter()
533추가: .filter(|row| !row.ids.is_empty() && row.ids.is_subset(&self.model.selected))
534추가: .map(|row| row.path)
535추가: .collect()
536추가: };
537추가: if names.is_empty() {
538추가: return false;
539추가: }
540추가: if !self.drag_out.as_mut().is_some_and(|drag| drag.start()) {
541추가: crate::log_warn!("운영체제 끌기를 시작하지 못함");
542추가: return false;
543추가: }
544추가: crate::log_debug!("창 밖으로 끌기 시작: {names:?}");
545추가: // 운영체제가 끌기를 넘겨받으면 버튼 놓기가 이 창에 오지 않으므로 대신 넣어 줌.
546추가: self.release_after_move = true;
547추가: self.marquee = None;
548추가: self.drag_cancelled = false;
549추가: self.last_open = None;
550추가: let Some(folder) = self.new_open_folder() else {
551추가: if let Some(drag) = self.drag_out.as_mut() {
552추가: drag.fail();
553추가: }
554추가: return false;
555추가: };
475556 let request = OpenRequest {
476557 folder: folder.clone(),
477삭제: name: name.replace('\\', "/"),
558추가: name: String::new(),
478559 destination: std::mem::replace(&mut self.destination, folder),
479560 automatic: std::mem::replace(&mut self.automatic_destination, true),
561추가: drag: Some(names),
480562 };
481563 self.opening = Some(request);
482삭제: if self.extract_selection(Selection::EntryIds(vec![entry_id])) {
483삭제: self.last_open = Some(entry_id);
564추가: let selection = Selection::EntryIds(
565추가: browser::expand_selection(&self.model.entries, &self.model.selected)
566추가: .into_iter()
567추가: .collect(),
568추가: );
569추가: if self.extract_selection(selection) {
484570 true
485571 } else {
486572 self.finish_open(false);
@@ -488,6 +574,20 @@ impl ArchiveApp {
488574 }
489575 }
490576
577추가: /// 운영체제 끌기에서 온 사건을 처리함.
578추가: fn poll_drag_out(&mut self) {
579추가: while let Some(event) = self.drag_out.as_mut().and_then(|drag| drag.poll()) {
580추가: crate::log_debug!("끌어 놓기 사건: {event:?}");
581추가: let dragging = self.opening.as_ref().is_some_and(|r| r.drag.is_some());
582추가: if event == crate::drag_out::DragEvent::Cancelled && dragging && self.model.busy() {
583추가: // 받을 곳이 없으므로 풀던 작업을 취소하고 결과 창은 띄우지 않음.
584추가: self.drag_cancelled = true;
585추가: self.clear_password();
586추가: self.model.cancel();
587추가: }
588추가: }
589추가: }
590추가:
491591 /// 한도를 늘려 다시 시도할 수 있는 결과가 화면에 남아 있는 동안은 열기 상태를 유지함.
492592 fn open_retry_pending(&self) -> bool {
493593 self.opening.is_some() && !self.dismissed && self.model.can_retry_expanded()
@@ -507,6 +607,34 @@ impl ArchiveApp {
507607 };
508608 self.destination = request.destination;
509609 self.automatic_destination = request.automatic;
610추가: if let Some(names) = request.drag {
611추가: let cancelled = std::mem::take(&mut self.drag_cancelled);
612추가: let paths: Vec<PathBuf> = names
613추가: .iter()
614추가: .map(|name| {
615추가: name.split('/')
616추가: .fold(request.folder.clone(), |path, part| path.join(part))
617추가: })
618추가: .filter(|path| completed && path.exists())
619추가: .collect();
620추가: let Some(drag) = self.drag_out.as_mut() else {
621추가: return;
622추가: };
623추가: if paths.is_empty() {
624추가: drag.fail();
625추가: if cancelled {
626추가: self.dismissed = true;
627추가: } else if completed {
628추가: self.ui_error = Some(present::OPEN_MISSING.into());
629추가: }
630추가: } else {
631추가: crate::log_debug!("끌어 놓을 파일 준비 끝: {}개", paths.len());
632추가: drag.provide(&paths);
633추가: // 결과 창 없이 받는 쪽이 파일을 가져가게 함.
634추가: self.dismissed = true;
635추가: }
636추가: return;
637추가: }
510638 if !completed {
511639 return;
512640 }
@@ -1329,6 +1457,7 @@ impl ArchiveApp {
13291457 self.initialized = true;
13301458 }
13311459 self.poll();
1460추가: self.poll_drag_out();
13321461 let preview_was_open = self.preview_open;
13331462 self.poll_picker();
13341463 if self.model.challenge.is_some_and(|(_, _, encrypt)| encrypt)
@@ -2166,6 +2295,7 @@ impl ArchiveApp {
21662295 let mut open = None;
21672296 let mut open_file = None;
21682297 let mut menu_action = None;
2298추가: let mut drag_out = false;
21692299 let mut next_offset = None;
21702300 let output = egui::ScrollArea::vertical()
21712301 .id_salt("archive-rows")
@@ -2260,7 +2390,10 @@ impl ArchiveApp {
22602390 .interact(
22612391 rect,
22622392 egui::Id::unique(("archive-row", &row.path)),
2263삭제: if active {
2393추가: if active && self.drag_out.is_some() {
2394추가: // 선택한 항목을 창 밖으로 끌어 놓을 수 있게 끌기도 받음.
2395추가: egui::Sense::click_and_drag()
2396추가: } else if active {
22642397 egui::Sense::click()
22652398 } else {
22662399 egui::Sense::hover()
@@ -2305,6 +2438,13 @@ impl ArchiveApp {
23052438 modifiers.shift,
23062439 );
23072440 }
2441추가: if active && self.drag_out.is_some() && response.drag_started() {
2442추가: if !selected {
2443추가: // 선택하지 않은 행을 끌면 그 행만 선택한 뒤 끎.
2444추가: self.select_row(&rows, index, false, false);
2445추가: }
2446추가: drag_out = true;
2447추가: }
23082448 if response.double_clicked() {
23092449 if row.directory {
23102450 open = Some(row.path.clone());
@@ -2503,6 +2643,9 @@ impl ArchiveApp {
25032643 if let Some(id) = open_file {
25042644 self.open_entry(id);
25052645 }
2646추가: if drag_out {
2647추가: self.begin_drag_out();
2648추가: }
25062649 match menu_action {
25072650 Some(MenuAction::NewFolder) => {
25082651 self.extract_to_new_folder();
수정experiments/rust-ui-memory-app/src/desktop.rs+8-0
@@ -13,6 +13,9 @@ mod fake;
1313mod renderer;
1414#[path = "system_font.rs"]
1515mod system_font;
16추가: #[cfg(target_os = "linux")]
17추가: #[path = "drag_out_wayland.rs"]
18추가: mod drag_out_wayland;
1619use eframe::egui;
1720fn main() -> eframe::Result {
1821 zipelo_ui_memory_app::log_info!(
@@ -151,6 +154,11 @@ fn run() -> eframe::Result {
151154 fixture,
152155 );
153156 app.set_custom_frame(custom_frame);
157추가: // Wayland에서는 목록 항목을 창 밖으로 끌어 놓아 풀 수 있게 함.
158추가: #[cfg(target_os = "linux")]
159추가: if !fixture && let Some(drag) = drag_out_wayland::create(cc, cc.egui_ctx.clone()) {
160추가: app.set_drag_out(Box::new(drag));
161추가: }
154162 app.set_work_window_in_parent(custom_frame);
155163 Ok(Box::new(app))
156164 })
추가experiments/rust-ui-memory-app/src/drag_out.rs+83-0
@@ -0,0 +1,83 @@
1추가: //! 압축파일 안 항목을 창 밖(파일 관리자, 브라우저 업로드 영역 등)으로 끌어 놓는 기능의
2추가: //! 운영체제 독립 부분.
3추가: //!
4추가: //! 끌기를 시작하면 앱은 선택 항목을 임시 폴더에 풀고, 받는 쪽이 데이터를 요청하면 풀린
5추가: //! 파일의 경로를 넘김. 실제 복사(폴더 위에 놓으면 그 폴더 안, 빈 곳이면 열린 폴더)와
6추가: //! 같은 이름 처리는 받는 프로그램이 함. 운영체제별 끌기 시작은 [`DragOut`] 구현이 맡음.
7추가:
8추가: use std::path::{Path, PathBuf};
9추가:
10추가: /// 운영체제 끌기에서 앱이 알아야 하는 사건.
11추가: #[derive(Clone, Copy, Debug, Eq, PartialEq)]
12추가: pub enum DragEvent {
13추가: /// 받는 쪽이 놓기를 받아들임. 이제 데이터를 요청하거나 이미 요청함.
14추가: Dropped,
15추가: /// 받는 쪽이 데이터를 다 받음.
16추가: Finished,
17추가: /// 놓지 않고 취소했거나 받는 쪽이 거절함.
18추가: Cancelled,
19추가: }
20추가:
21추가: /// 운영체제별 끌어 놓기 시작 구현.
22추가: pub trait DragOut {
23추가: /// 지금 누르고 있는 마우스 버튼으로 운영체제 끌기를 시작함. 시작하지 못하면 false.
24추가: fn start(&mut self) -> bool;
25추가: /// 지난 화면 이후 들어온 끌기 사건.
26추가: fn poll(&mut self) -> Option<DragEvent>;
27추가: /// 풀기가 끝난 파일과 폴더의 절대 경로를 넘김. 이미 들어온 요청과 이후 요청에 씀.
28추가: fn provide(&mut self, paths: &[PathBuf]);
29추가: /// 풀기에 실패함. 기다리는 요청에는 빈 목록을 보내고 끌기를 끝냄.
30추가: fn fail(&mut self);
31추가: }
32추가:
33추가: /// RFC 2483 text/uri-list 본문을 만듦. 경로의 각 바이트를 file URI 규칙으로 바꿈.
34추가: pub fn uri_list(paths: &[PathBuf]) -> String {
35추가: let mut text = String::new();
36추가: for path in paths {
37추가: text.push_str(&file_uri(path));
38추가: text.push_str("\r\n");
39추가: }
40추가: text
41추가: }
42추가:
43추가: /// 절대 경로를 file:// URI로 바꿈. 영문, 숫자, '-', '.', '_', '~', '/'만 그대로 두고
44추가: /// 나머지 바이트(공백, 한글 UTF-8 등)는 %XX로 씀.
45추가: pub fn file_uri(path: &Path) -> String {
46추가: #[cfg(unix)]
47추가: let bytes = {
48추가: use std::os::unix::ffi::OsStrExt;
49추가: path.as_os_str().as_bytes().to_vec()
50추가: };
51추가: #[cfg(not(unix))]
52추가: let bytes = path.to_string_lossy().replace('\\', "/").into_bytes();
53추가: let mut uri = String::from("file://");
54추가: #[cfg(not(unix))]
55추가: uri.push('/');
56추가: for byte in bytes {
57추가: if byte.is_ascii_alphanumeric() || matches!(byte, b'-' | b'.' | b'_' | b'~' | b'/') {
58추가: uri.push(byte as char);
59추가: } else {
60추가: uri.push_str(&format!("%{byte:02X}"));
61추가: }
62추가: }
63추가: uri
64추가: }
65추가:
66추가: #[cfg(test)]
67추가: mod tests {
68추가: use super::*;
69추가:
70추가: #[cfg(unix)]
71추가: #[test]
72추가: fn uri_list_escapes_spaces_hangul_and_reserved_bytes() {
73추가: let paths = [
74추가: PathBuf::from("/tmp/여행 자료/a#b.txt"),
75추가: PathBuf::from("/tmp/x/폴더"),
76추가: ];
77추가: assert_eq!(
78추가: uri_list(&paths),
79추가: "file:///tmp/%EC%97%AC%ED%96%89%20%EC%9E%90%EB%A3%8C/a%23b.txt\r\n\
80추가: file:///tmp/x/%ED%8F%B4%EB%8D%94\r\n"
81추가: );
82추가: }
83추가: }
추가experiments/rust-ui-memory-app/src/drag_out_wayland.rs+407-0
@@ -0,0 +1,407 @@
1추가: //! Wayland에서 압축파일 안 항목을 창 밖으로 끌어 놓기.
2추가: //!
3추가: //! winit은 끌어 놓기를 받기만 하고 시작하지는 못하므로, winit이 쓰는 같은 Wayland 연결에
4추가: //! 별도 이벤트 큐를 만들어 wl_data_device로 직접 끌기를 시작함. 끌기 시작에는 버튼을 누른
5추가: //! 순간의 serial이 필요하므로 같은 seat에서 포인터를 하나 더 받아 왼쪽 버튼 누름을 기억함.
6추가: //!
7추가: //! 받는 쪽에는 text/uri-list(풀린 파일 경로)와, 샌드박스 앱(스냅·Flatpak 브라우저 등)을
8추가: //! 위한 application/vnd.portal.filetransfer(문서 포털 전송 키)를 함께 제공함.
9추가:
10추가: use std::{
11추가: collections::VecDeque,
12추가: io::Write,
13추가: os::fd::OwnedFd,
14추가: path::PathBuf,
15추가: sync::{Arc, Mutex},
16추가: };
17추가: use wayland_client::{
18추가: Connection, Dispatch, Proxy, QueueHandle, WEnum, event_created_child,
19추가: protocol::{
20추가: wl_data_device, wl_data_device_manager, wl_data_offer, wl_data_source, wl_pointer,
21추가: wl_registry, wl_seat, wl_surface,
22추가: },
23추가: };
24추가: use zipelo_ui_memory_app::drag_out::{DragEvent, DragOut, uri_list};
25추가:
26추가: const URI_LIST: &str = "text/uri-list";
27추가: const PORTAL: &str = "application/vnd.portal.filetransfer";
28추가: /// linux/input-event-codes.h의 BTN_LEFT.
29추가: const BTN_LEFT: u32 = 0x110;
30추가:
31추가: enum Ready {
32추가: Paths(Vec<PathBuf>),
33추가: Failed,
34추가: }
35추가:
36추가: #[derive(Default)]
37추가: struct Shared {
38추가: /// 이 창 위에서 누르고 있는 왼쪽 버튼의 serial.
39추가: press: Option<u32>,
40추가: /// 파일이 준비되기 전에 들어온 데이터 요청.
41추가: pending: Vec<(String, OwnedFd)>,
42추가: ready: Option<Ready>,
43추가: events: VecDeque<DragEvent>,
44추가: source: Option<wl_data_source::WlDataSource>,
45추가: }
46추가:
47추가: struct State {
48추가: shared: Arc<Mutex<Shared>>,
49추가: surface: wl_surface::WlSurface,
50추가: focused: bool,
51추가: seat: Option<wl_seat::WlSeat>,
52추가: manager: Option<wl_data_device_manager::WlDataDeviceManager>,
53추가: pointer: Option<wl_pointer::WlPointer>,
54추가: repaint: eframe::egui::Context,
55추가: }
56추가:
57추가: pub struct WaylandDrag {
58추가: conn: Connection,
59추가: qh: QueueHandle<State>,
60추가: manager: wl_data_device_manager::WlDataDeviceManager,
61추가: device: wl_data_device::WlDataDevice,
62추가: surface: wl_surface::WlSurface,
63추가: shared: Arc<Mutex<Shared>>,
64추가: /// 문서 포털 전송을 쓸 수 있는지. 시작을 늦추지 않도록 따로 확인함.
65추가: portal: Arc<std::sync::atomic::AtomicBool>,
66추가: }
67추가:
68추가: /// 창이 Wayland 창이면 끌어 놓기 구현을 만듦. 아니면(X11, Windows) None.
69추가: pub fn create(
70추가: handles: &(impl raw_window_handle::HasDisplayHandle + raw_window_handle::HasWindowHandle),
71추가: repaint: eframe::egui::Context,
72추가: ) -> Option<WaylandDrag> {
73추가: use raw_window_handle::{RawDisplayHandle, RawWindowHandle};
74추가: let RawDisplayHandle::Wayland(display) = handles.display_handle().ok()?.as_raw() else {
75추가: return None;
76추가: };
77추가: let RawWindowHandle::Wayland(window) = handles.window_handle().ok()?.as_raw() else {
78추가: return None;
79추가: };
80추가: // 안전성: winit이 만든 wl_display와 wl_surface는 창이 살아 있는 동안 유효함.
81추가: // 앱은 창과 같은 수명으로 이 구현을 들고 있으며, 외부 디스플레이는 닫지 않음.
82추가: let backend = unsafe {
83추가: wayland_backend::sys::client::Backend::from_foreign_display(display.display.as_ptr().cast())
84추가: };
85추가: let conn = Connection::from_backend(backend);
86추가: let surface_id = unsafe {
87추가: wayland_backend::sys::client::ObjectId::from_ptr(
88추가: wl_surface::WlSurface::interface(),
89추가: window.surface.as_ptr().cast(),
90추가: )
91추가: }
92추가: .ok()?;
93추가: let surface = wl_surface::WlSurface::from_id(&conn, surface_id).ok()?;
94추가: let mut queue = conn.new_event_queue::<State>();
95추가: let qh = queue.handle();
96추가: let shared = Arc::new(Mutex::new(Shared::default()));
97추가: let mut state = State {
98추가: shared: shared.clone(),
99추가: surface: surface.clone(),
100추가: focused: false,
101추가: seat: None,
102추가: manager: None,
103추가: pointer: None,
104추가: repaint,
105추가: };
106추가: conn.display().get_registry(&qh, ());
107추가: queue.roundtrip(&mut state).ok()?;
108추가: // seat의 포인터 지원 여부를 받음.
109추가: queue.roundtrip(&mut state).ok()?;
110추가: let manager = state.manager.clone()?;
111추가: let device = manager.get_data_device(state.seat.as_ref()?, &qh, ());
112추가: queue.roundtrip(&mut state).ok()?;
113추가: let portal = Arc::new(std::sync::atomic::AtomicBool::new(false));
114추가: let found = portal.clone();
115추가: let _ = std::thread::Builder::new()
116추가: .name("zipelo-portal-check".into())
117추가: .spawn(move || {
118추가: let available = pollster::block_on(ashpd::documents::FileTransfer::new()).is_ok();
119추가: zipelo_ui_memory_app::log_debug!("문서 포털 전송 사용 가능: {available}");
120추가: found.store(available, std::sync::atomic::Ordering::Release);
121추가: });
122추가: zipelo_ui_memory_app::log_debug!(
123추가: "Wayland 끌어 놓기 준비 (데이터 장치 v{})",
124추가: manager.version()
125추가: );
126추가: std::thread::Builder::new()
127추가: .name("zipelo-wayland-drag".into())
128추가: .spawn(move || {
129추가: loop {
130추가: if let Err(error) = queue.blocking_dispatch(&mut state) {
131추가: zipelo_ui_memory_app::log_warn!("Wayland 끌어 놓기 큐 종료: {error}");
132추가: break;
133추가: }
134추가: }
135추가: })
136추가: .ok()?;
137추가: Some(WaylandDrag {
138추가: conn,
139추가: qh,
140추가: manager,
141추가: device,
142추가: surface,
143추가: shared,
144추가: portal,
145추가: })
146추가: }
147추가:
148추가: impl DragOut for WaylandDrag {
149추가: fn start(&mut self) -> bool {
150추가: let mut shared = self.shared.lock().unwrap();
151추가: let Some(serial) = shared.press else {
152추가: zipelo_ui_memory_app::log_debug!("끌기 시작 실패: 누르고 있는 버튼 없음");
153추가: return false;
154추가: };
155추가: if let Some(old) = shared.source.take() {
156추가: old.destroy();
157추가: }
158추가: shared.pending.clear();
159추가: shared.ready = None;
160추가: shared.events.clear();
161추가: let source = self.manager.create_data_source(&self.qh, ());
162추가: source.offer(URI_LIST.into());
163추가: if self.portal.load(std::sync::atomic::Ordering::Acquire) {
164추가: source.offer(PORTAL.into());
165추가: }
166추가: if source.version() >= 3 {
167추가: source.set_actions(wl_data_device_manager::DndAction::Copy);
168추가: }
169추가: self.device
170추가: .start_drag(Some(&source), &self.surface, None, serial);
171추가: shared.source = Some(source);
172추가: drop(shared);
173추가: self.conn.flush().is_ok()
174추가: }
175추가:
176추가: fn poll(&mut self) -> Option<DragEvent> {
177추가: self.shared.lock().unwrap().events.pop_front()
178추가: }
179추가:
180추가: fn provide(&mut self, paths: &[PathBuf]) {
181추가: let pending = {
182추가: let mut shared = self.shared.lock().unwrap();
183추가: shared.ready = Some(Ready::Paths(paths.to_vec()));
184추가: std::mem::take(&mut shared.pending)
185추가: };
186추가: for (mime, fd) in pending {
187추가: send(mime, fd, paths.to_vec());
188추가: }
189추가: }
190추가:
191추가: fn fail(&mut self) {
192추가: let mut shared = self.shared.lock().unwrap();
193추가: shared.ready = Some(Ready::Failed);
194추가: // 기다리던 요청은 fd를 닫아 빈 데이터로 끝냄.
195추가: shared.pending.clear();
196추가: }
197추가: }
198추가:
199추가: /// 받는 쪽이 요청한 형식으로 데이터를 써 줌. 받는 쪽이 늦게 읽어도 화면이 멈추지 않게
200추가: /// 별도 스레드에서 씀.
201추가: fn send(mime: String, fd: OwnedFd, paths: Vec<PathBuf>) {
202추가: let _ = std::thread::Builder::new()
203추가: .name("zipelo-wayland-send".into())
204추가: .spawn(move || {
205추가: let data = if mime == PORTAL {
206추가: match portal_key(&paths) {
207추가: Ok(key) => key,
208추가: Err(error) => {
209추가: zipelo_ui_memory_app::log_warn!("문서 포털 전송 실패: {error}");
210추가: return;
211추가: }
212추가: }
213추가: } else {
214추가: uri_list(&paths)
215추가: };
216추가: let mut file = std::fs::File::from(fd);
217추가: if let Err(error) = file.write_all(data.as_bytes()) {
218추가: zipelo_ui_memory_app::log_warn!("끌어 놓기 데이터 쓰기 실패: {error}");
219추가: }
220추가: });
221추가: }
222추가:
223추가: /// 문서 포털에 파일을 올리고 받는 쪽에 넘길 전송 키를 만듦.
224추가: fn portal_key(paths: &[PathBuf]) -> Result<String, String> {
225추가: use std::os::unix::fs::OpenOptionsExt;
226추가: let files = paths
227추가: .iter()
228추가: .map(|path| {
229추가: // 폴더도 넘길 수 있도록 O_PATH로 엶.
230추가: std::fs::OpenOptions::new()
231추가: .read(true)
232추가: .custom_flags(0o10000000 | 0o2000000)
233추가: .open(path)
234추가: })
235추가: .collect::<Result<Vec<_>, _>>()
236추가: .map_err(|error| error.to_string())?;
237추가: pollster::block_on(async {
238추가: let transfer = ashpd::documents::FileTransfer::new().await?;
239추가: let key = transfer.start_transfer(false, true).await?;
240추가: transfer.add_files(&key, &files).await?;
241추가: Ok::<_, ashpd::Error>(key)
242추가: })
243추가: .map_err(|error| error.to_string())
244추가: }
245추가:
246추가: impl Dispatch<wl_registry::WlRegistry, ()> for State {
247추가: fn event(
248추가: state: &mut Self,
249추가: registry: &wl_registry::WlRegistry,
250추가: event: wl_registry::Event,
251추가: _: &(),
252추가: _: &Connection,
253추가: qh: &QueueHandle<Self>,
254추가: ) {
255추가: if let wl_registry::Event::Global {
256추가: name,
257추가: interface,
258추가: version,
259추가: } = event
260추가: {
261추가: match interface.as_str() {
262추가: "wl_seat" if state.seat.is_none() => {
263추가: state.seat = Some(registry.bind(name, version.min(5), qh, ()));
264추가: }
265추가: "wl_data_device_manager" if state.manager.is_none() => {
266추가: state.manager = Some(registry.bind(name, version.min(3), qh, ()));
267추가: }
268추가: _ => {}
269추가: }
270추가: }
271추가: }
272추가: }
273추가:
274추가: impl Dispatch<wl_seat::WlSeat, ()> for State {
275추가: fn event(
276추가: state: &mut Self,
277추가: seat: &wl_seat::WlSeat,
278추가: event: wl_seat::Event,
279추가: _: &(),
280추가: _: &Connection,
281추가: qh: &QueueHandle<Self>,
282추가: ) {
283추가: if let wl_seat::Event::Capabilities {
284추가: capabilities: WEnum::Value(capabilities),
285추가: } = event
286추가: && capabilities.contains(wl_seat::Capability::Pointer)
287추가: && state.pointer.is_none()
288추가: {
289추가: state.pointer = Some(seat.get_pointer(qh, ()));
290추가: }
291추가: }
292추가: }
293추가:
294추가: impl Dispatch<wl_pointer::WlPointer, ()> for State {
295추가: fn event(
296추가: state: &mut Self,
297추가: _: &wl_pointer::WlPointer,
298추가: event: wl_pointer::Event,
299추가: _: &(),
300추가: _: &Connection,
301추가: _: &QueueHandle<Self>,
302추가: ) {
303추가: match event {
304추가: wl_pointer::Event::Enter { surface, .. } => {
305추가: state.focused = surface == state.surface;
306추가: }
307추가: wl_pointer::Event::Leave { .. } => state.focused = false,
308추가: wl_pointer::Event::Button {
309추가: serial,
310추가: button: BTN_LEFT,
311추가: state: WEnum::Value(pressed),
312추가: ..
313추가: } => {
314추가: state.shared.lock().unwrap().press =
315추가: (state.focused && pressed == wl_pointer::ButtonState::Pressed)
316추가: .then_some(serial);
317추가: }
318추가: _ => {}
319추가: }
320추가: }
321추가: }
322추가:
323추가: impl Dispatch<wl_data_device_manager::WlDataDeviceManager, ()> for State {
324추가: fn event(
325추가: _: &mut Self,
326추가: _: &wl_data_device_manager::WlDataDeviceManager,
327추가: _: wl_data_device_manager::Event,
328추가: _: &(),
329추가: _: &Connection,
330추가: _: &QueueHandle<Self>,
331추가: ) {
332추가: }
333추가: }
334추가:
335추가: impl Dispatch<wl_data_device::WlDataDevice, ()> for State {
336추가: fn event(
337추가: _: &mut Self,
338추가: _: &wl_data_device::WlDataDevice,
339추가: _: wl_data_device::Event,
340추가: _: &(),
341추가: _: &Connection,
342추가: _: &QueueHandle<Self>,
343추가: ) {
344추가: // 이 창으로 들어오는 끌어 놓기는 winit이 따로 처리하므로 무시함.
345추가: }
346추가:
347추가: event_created_child!(State, wl_data_device::WlDataDevice, [
348추가: wl_data_device::EVT_DATA_OFFER_OPCODE => (wl_data_offer::WlDataOffer, ()),
349추가: ]);
350추가: }
351추가:
352추가: impl Dispatch<wl_data_offer::WlDataOffer, ()> for State {
353추가: fn event(
354추가: _: &mut Self,
355추가: _: &wl_data_offer::WlDataOffer,
356추가: _: wl_data_offer::Event,
357추가: _: &(),
358추가: _: &Connection,
359추가: _: &QueueHandle<Self>,
360추가: ) {
361추가: }
362추가: }
363추가:
364추가: impl Dispatch<wl_data_source::WlDataSource, ()> for State {
365추가: fn event(
366추가: state: &mut Self,
367추가: source: &wl_data_source::WlDataSource,
368추가: event: wl_data_source::Event,
369추가: _: &(),
370추가: _: &Connection,
371추가: _: &QueueHandle<Self>,
372추가: ) {
373추가: let mut shared = state.shared.lock().unwrap();
374추가: let current = shared.source.as_ref() == Some(source);
375추가: match event {
376추가: wl_data_source::Event::Send { mime_type, fd } => {
377추가: zipelo_ui_memory_app::log_debug!("끌어 놓기 데이터 요청: {mime_type}");
378추가: match &shared.ready {
379추가: Some(Ready::Paths(paths)) => send(mime_type, fd, paths.clone()),
380추가: // 실패했으면 fd를 닫아 빈 데이터로 끝냄.
381추가: Some(Ready::Failed) => {}
382추가: None => shared.pending.push((mime_type, fd)),
383추가: }
384추가: }
385추가: wl_data_source::Event::Cancelled => {
386추가: source.destroy();
387추가: if current {
388추가: shared.source = None;
389추가: shared.events.push_back(DragEvent::Cancelled);
390추가: }
391추가: }
392추가: wl_data_source::Event::DndDropPerformed if current => {
393추가: shared.events.push_back(DragEvent::Dropped);
394추가: }
395추가: wl_data_source::Event::DndFinished => {
396추가: source.destroy();
397추가: if current {
398추가: shared.source = None;
399추가: shared.events.push_back(DragEvent::Finished);
400추가: }
401추가: }
402추가: _ => {}
403추가: }
404추가: drop(shared);
405추가: state.repaint.request_repaint();
406추가: }
407추가: }
수정experiments/rust-ui-memory-app/src/lib.rs+2-0
@@ -24,5 +24,7 @@ pub mod window_frame;
2424
2525pub mod archive_path;
2626
27추가: pub mod drag_out;
28추가:
2729#[cfg(feature = "ui")]
2830pub mod app_icon;
추가tests/rust-app-ui/drag_out_flow.rs+169-0
@@ -0,0 +1,169 @@
1추가: // 목록 항목을 창 밖으로 끌어 놓는 흐름 시험. 운영체제 끌기는 가짜 구현으로 대신함.
2추가: // presentation.rs의 widgets 모듈 안에 explorer_selection.rs 다음으로 포함됨.
3추가:
4추가: #[derive(Default)]
5추가: struct DragLog {
6추가: starts: usize,
7추가: accept: bool,
8추가: provided: Vec<Vec<PathBuf>>,
9추가: failed: usize,
10추가: events: std::collections::VecDeque<zipelo_ui_memory_app::drag_out::DragEvent>,
11추가: }
12추가:
13추가: struct FakeDrag(std::rc::Rc<std::cell::RefCell<DragLog>>);
14추가:
15추가: impl zipelo_ui_memory_app::drag_out::DragOut for FakeDrag {
16추가: fn start(&mut self) -> bool {
17추가: let mut log = self.0.borrow_mut();
18추가: log.starts += 1;
19추가: log.accept
20추가: }
21추가: fn poll(&mut self) -> Option<zipelo_ui_memory_app::drag_out::DragEvent> {
22추가: self.0.borrow_mut().events.pop_front()
23추가: }
24추가: fn provide(&mut self, paths: &[PathBuf]) {
25추가: self.0.borrow_mut().provided.push(paths.to_vec());
26추가: }
27추가: fn fail(&mut self) {
28추가: self.0.borrow_mut().failed += 1;
29추가: }
30추가: }
31추가:
32추가: fn with_drag(s: &mut Explorer) -> std::rc::Rc<std::cell::RefCell<DragLog>> {
33추가: let log = std::rc::Rc::new(std::cell::RefCell::new(DragLog {
34추가: accept: true,
35추가: ..Default::default()
36추가: }));
37추가: s.app.set_drag_out(Box::new(FakeDrag(log.clone())));
38추가: s.frame(egui::Modifiers::NONE, vec![]);
39추가: log
40추가: }
41추가:
42추가: /// 행을 누른 채 아래로 끌어 egui 끌기를 시작함.
43추가: fn drag_row(s: &mut Explorer, path: &str) {
44추가: s.time += 1.0;
45추가: let start = s.row(path).center();
46추가: s.pointer(start, true, egui::Modifiers::NONE);
47추가: for step in 1..=4 {
48추가: s.frame(
49추가: egui::Modifiers::NONE,
50추가: vec![egui::Event::PointerMoved(start + egui::vec2(0.0, 12.0 * step as f32))],
51추가: );
52추가: }
53추가: }
54추가:
55추가: fn finish_worker(s: &mut Explorer) {
56추가: {
57추가: let mut worker = s.factory.state.borrow_mut();
58추가: worker.frame(Event::Accepted { encryption: false });
59추가: worker.finish(Outcome::Completed, Publication::Complete);
60추가: }
61추가: for _ in 0..10 {
62추가: s.frame(egui::Modifiers::NONE, vec![]);
63추가: }
64추가: }
65추가:
66추가: #[test]
67추가: fn dragging_selected_rows_out_extracts_them_and_hands_over_their_paths() {
68추가: let scratch = Folder::new();
69추가: let mut s = Explorer::new(&scratch);
70추가: let log = with_drag(&mut s);
71추가: s.click("alpha.txt", egui::Modifiers::NONE);
72추가: s.click("docs", explorer_ctrl());
73추가: s.selected(&[0, 1, 5]);
74추가: s.factory.state.borrow_mut().manual = true;
75추가: drag_row(&mut s, "alpha.txt");
76추가: assert_eq!(log.borrow().starts, 1);
77추가: // 선택이 유지되고(끌기는 범위 선택이 아님), 하위 항목을 포함해 임시 폴더에 풂.
78추가: s.selected(&[0, 1, 5]);
79추가: let folder = scratch.0.join("sample.zip (Zipelo 임시)").join("1");
80추가: {
81추가: let state = s.factory.state.borrow();
82추가: let Some(Start::Extract {
83추가: destination,
84추가: selection: Selection::EntryIds(ids),
85추가: ..
86추가: }) = state.starts.last()
87추가: else {
88추가: panic!("{:?}", state.starts.last());
89추가: };
90추가: assert_eq!(destination, &folder);
91추가: assert_eq!(ids, &vec![0, 1, 5]);
92추가: }
93추가: // 풀기가 끝나기 전에는 경로를 넘기지 않음.
94추가: assert!(log.borrow().provided.is_empty());
95추가: fs::create_dir_all(folder.join("docs")).unwrap();
96추가: fs::write(folder.join("docs/child.txt"), "x").unwrap();
97추가: fs::write(folder.join("alpha.txt"), "x").unwrap();
98추가: finish_worker(&mut s);
99추가: assert_eq!(
100추가: log.borrow().provided,
101추가: // 목록과 같은 순서(폴더 먼저).
102추가: vec![vec![folder.join("docs"), folder.join("alpha.txt")]]
103추가: );
104추가: // 결과 창 없이 끝나고, 원래 풀 위치로 되돌아옴.
105추가: assert!(!s.app.model.busy());
106추가: s.factory.state.borrow_mut().manual = false;
107추가: assert!(s.app.begin_extract());
108추가: assert!(matches!(
109추가: s.factory.state.borrow().starts.last(),
110추가: Some(Start::Extract { destination, .. }) if !destination.starts_with(scratch.0.join("sample.zip (Zipelo 임시)"))
111추가: ));
112추가: }
113추가:
114추가: #[test]
115추가: fn dragging_an_unselected_row_selects_only_that_row() {
116추가: let scratch = Folder::new();
117추가: let mut s = Explorer::new(&scratch);
118추가: let log = with_drag(&mut s);
119추가: s.click("alpha.txt", egui::Modifiers::NONE);
120추가: s.factory.state.borrow_mut().manual = true;
121추가: drag_row(&mut s, "beta.txt");
122추가: assert_eq!(log.borrow().starts, 1);
123추가: s.selected(&[2]);
124추가: }
125추가:
126추가: #[test]
127추가: fn cancelling_the_drag_cancels_extraction_without_a_result_window() {
128추가: let scratch = Folder::new();
129추가: let mut s = Explorer::new(&scratch);
130추가: let log = with_drag(&mut s);
131추가: s.click("alpha.txt", egui::Modifiers::NONE);
132추가: s.factory.state.borrow_mut().manual = true;
133추가: drag_row(&mut s, "alpha.txt");
134추가: assert!(s.app.model.busy());
135추가: log.borrow_mut()
136추가: .events
137추가: .push_back(zipelo_ui_memory_app::drag_out::DragEvent::Cancelled);
138추가: s.frame(egui::Modifiers::NONE, vec![]);
139추가: assert!(s.app.model.cancellation_requested());
140추가: {
141추가: let mut worker = s.factory.state.borrow_mut();
142추가: worker.frame(Event::Accepted { encryption: false });
143추가: worker.finish(Outcome::Cancelled, Publication::None);
144추가: }
145추가: let mut labels = Vec::new();
146추가: for _ in 0..10 {
147추가: labels = layout_text(&s.frame(egui::Modifiers::NONE, vec![]));
148추가: }
149추가: assert_eq!(log.borrow().failed, 1);
150추가: assert!(log.borrow().provided.is_empty());
151추가: assert!(
152추가: !labels.iter().any(|(text, _, _)| text.contains("취소했습니다")),
153추가: "{labels:?}"
154추가: );
155추가: }
156추가:
157추가: #[test]
158추가: fn rows_do_not_start_a_drag_when_the_platform_cannot() {
159추가: let scratch = Folder::new();
160추가: let mut s = Explorer::new(&scratch);
161추가: let log = with_drag(&mut s);
162추가: log.borrow_mut().accept = false;
163추가: s.click("alpha.txt", egui::Modifiers::NONE);
164추가: drag_row(&mut s, "alpha.txt");
165추가: assert_eq!(log.borrow().starts, 1);
166추가: // 끌기를 시작하지 못하면 아무 작업도 시작하지 않음.
167추가: assert!(!s.app.model.busy());
168추가: assert_eq!(s.factory.state.borrow().starts.len(), 1);
169추가: }
수정tests/rust-app-ui/presentation.rs+1-0
@@ -1051,6 +1051,7 @@ mod widgets {
10511051 include!("long_layout.rs");
10521052 include!("explorer_selection.rs");
10531053 include!("find_escape.rs");
1054추가: include!("drag_out_flow.rs");
10541055 include!("window_frame.rs");
10551056 include!("work_window.rs");
10561057 include!("create_window.rs");