Files
zed/crates/open_path_prompt/src/file_finder_settings.rs
Mohamad Khani b72a46db68
Some checks failed
Update All Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Triage Project Sync (#84) / Sync triage project (push) Has been cancelled
release_nightly / notify_on_failure (push) Has been cancelled
release_nightly / check_style (push) Has been cancelled
release_nightly / run_tests_windows (push) Has been cancelled
release_nightly / clippy_windows (push) Has been cancelled
release_nightly / bundle_linux_aarch64 (push) Has been cancelled
release_nightly / bundle_linux_x86_64 (push) Has been cancelled
release_nightly / bundle_mac_aarch64 (push) Has been cancelled
release_nightly / bundle_mac_x86_64 (push) Has been cancelled
release_nightly / bundle_windows_aarch64 (push) Has been cancelled
release_nightly / bundle_windows_x86_64 (push) Has been cancelled
release_nightly / build_nix_linux_x86_64 (push) Has been cancelled
release_nightly / build_nix_mac_aarch64 (push) Has been cancelled
release_nightly / update_nightly_tag (push) Has been cancelled
Hotfix Review Monitor / check-hotfix-reviews (push) Has been cancelled
Stale PR Review Reminder / check-stale-prs (push) Has been cancelled
Update Weekly Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Bump collab-staging Tag / update-collab-staging-tag (push) Has been cancelled
compliance_check / scheduled_compliance_check (push) Has been cancelled
logiguard fork: GPUI xdg-activation keyboard-focus serial fix
Single-commit orphan branch: full zed-industries/zed @ 8c74db0 source tree
with a 3-file patch applied (no upstream history).

Patch (crates/gpui_linux/src/linux/wayland/):
  - serial.rs: add SerialKind::KeyboardEnter
  - client.rs: store wl_keyboard.enter serial; add latest_serial_of()
  - window.rs: activate() uses keyboard-enter serial (Mutter focus gate)

Mutter honors window activation only when the token carries the keyboard-
focus serial from wl_keyboard.enter; GPUI used a stale mouse-press serial.
See docs/tray-window-focus-wayland.md in logiguard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 02:22:17 +03:30

54 lines
1.9 KiB
Rust

use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use settings::{RegisterSetting, Settings};
#[derive(Deserialize, Debug, Clone, Copy, PartialEq, RegisterSetting)]
pub struct FileFinderSettings {
pub file_icons: bool,
pub modal_max_width: FileFinderWidth,
pub skip_focus_for_active_in_search: bool,
pub include_ignored: Option<bool>,
pub include_channels: bool,
}
impl Settings for FileFinderSettings {
fn from_settings(content: &settings::SettingsContent) -> Self {
let file_finder = content.file_finder.as_ref().unwrap();
Self {
file_icons: file_finder.file_icons.unwrap(),
modal_max_width: file_finder.modal_max_width.unwrap().into(),
skip_focus_for_active_in_search: file_finder.skip_focus_for_active_in_search.unwrap(),
include_ignored: match file_finder.include_ignored.unwrap() {
settings::IncludeIgnoredContent::All => Some(true),
settings::IncludeIgnoredContent::Indexed => Some(false),
settings::IncludeIgnoredContent::Smart => None,
},
include_channels: file_finder.include_channels.unwrap(),
}
}
}
#[derive(Debug, PartialEq, Eq, Clone, Copy, Default, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "lowercase")]
pub enum FileFinderWidth {
#[default]
Small,
Medium,
Large,
XLarge,
Full,
}
impl From<settings::FileFinderWidthContent> for FileFinderWidth {
fn from(content: settings::FileFinderWidthContent) -> Self {
match content {
settings::FileFinderWidthContent::Small => FileFinderWidth::Small,
settings::FileFinderWidthContent::Medium => FileFinderWidth::Medium,
settings::FileFinderWidthContent::Large => FileFinderWidth::Large,
settings::FileFinderWidthContent::XLarge => FileFinderWidth::XLarge,
settings::FileFinderWidthContent::Full => FileFinderWidth::Full,
}
}
}