- Add optional modifier-only Super binding whose tap is cancelled by other input, focus changes, grabs, locks, and session teardown. - Ship the native ferese-rime user service, Rime defaults, installer inventory, package dependencies, session environment, and docs. - Vendor Smithay 8a27023 with the SHM texture-cache format fix and add GPU regressions for format changes and resize snapshots. - Release reused CRTC owners before staging output modes, then restore changed outputs before former owners when a transaction fails. - Wait for resize-capture GPU completion, expand filtered surface damage, and preserve IME popup origin under fractional scaling. - Mark weekends like holidays in both calendar layouts.
70 lines
2.3 KiB
Rust
70 lines
2.3 KiB
Rust
static POSSIBLE_BACKENDS: &[&str] = &[
|
|
#[cfg(feature = "winit")]
|
|
"--winit : Run anvil as a X11 or Wayland client using winit.",
|
|
#[cfg(feature = "udev")]
|
|
"--tty-udev : Run anvil as a tty udev client (requires root if without logind).",
|
|
#[cfg(feature = "x11")]
|
|
"--x11 : Run anvil as an X11 client.",
|
|
];
|
|
|
|
#[cfg(feature = "profile-with-tracy-mem")]
|
|
#[global_allocator]
|
|
static GLOBAL: profiling::tracy_client::ProfiledAllocator<std::alloc::System> =
|
|
profiling::tracy_client::ProfiledAllocator::new(std::alloc::System, 10);
|
|
|
|
// Allow in this function because of existing usage
|
|
#[allow(clippy::uninlined_format_args)]
|
|
fn main() {
|
|
if let Ok(env_filter) = tracing_subscriber::EnvFilter::try_from_default_env() {
|
|
tracing_subscriber::fmt()
|
|
.compact()
|
|
.with_env_filter(env_filter)
|
|
.init();
|
|
} else {
|
|
tracing_subscriber::fmt().compact().init();
|
|
}
|
|
|
|
#[cfg(feature = "profile-with-tracy")]
|
|
profiling::tracy_client::Client::start();
|
|
|
|
profiling::register_thread!("Main Thread");
|
|
|
|
#[cfg(feature = "profile-with-puffin")]
|
|
let _server = puffin_http::Server::new(&format!("0.0.0.0:{}", puffin_http::DEFAULT_PORT)).unwrap();
|
|
#[cfg(feature = "profile-with-puffin")]
|
|
profiling::puffin::set_scopes_on(true);
|
|
|
|
let arg = ::std::env::args().nth(1);
|
|
match arg.as_ref().map(|s| &s[..]) {
|
|
#[cfg(feature = "winit")]
|
|
Some("--winit") => {
|
|
tracing::info!("Starting anvil with winit backend");
|
|
anvil::winit::run_winit();
|
|
}
|
|
#[cfg(feature = "udev")]
|
|
Some("--tty-udev") => {
|
|
tracing::info!("Starting anvil on a tty using udev");
|
|
anvil::udev::run_udev();
|
|
}
|
|
#[cfg(feature = "x11")]
|
|
Some("--x11") => {
|
|
tracing::info!("Starting anvil with x11 backend");
|
|
anvil::x11::run_x11();
|
|
}
|
|
Some(other) => {
|
|
tracing::error!("Unknown backend: {}", other);
|
|
}
|
|
None => {
|
|
#[allow(clippy::disallowed_macros)]
|
|
{
|
|
println!("USAGE: anvil --backend");
|
|
println!();
|
|
println!("Possible backends are:");
|
|
for b in POSSIBLE_BACKENDS {
|
|
println!("\t{b}");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|