Increase default Wayland buffer size
Browse files at this commitb82d52705e1424cf47b26dd7b096832901c31f56Parent: c7fa5f23 changed files +6 -0
- Cargo.lock +1 -0
- Cargo.toml +1 -0
- src/main.rs +4 -0
Cargo.lockmodified+1 -0
| @@ -2258,6 +2258,7 @@ dependencies = [ | ||
| 2258 | 2258 | "wayland-backend", |
| 2259 | 2259 | "wayland-client", |
| 2260 | 2260 | "wayland-scanner", |
| 2261 | + "wayland-server", | |
| 2261 | 2262 | "xcursor", |
| 2262 | 2263 | "xshell", |
| 2263 | 2264 | "zbus", |
Cargo.tomlmodified+1 -0
| @@ -94,6 +94,7 @@ tracing.workspace = true | ||
| 94 | 94 | tracy-client.workspace = true |
| 95 | 95 | wayland-backend = "0.3.14" |
| 96 | 96 | wayland-scanner = "0.31.9" |
| 97 | +wayland-server = { version = "0.31.12", features = ["libwayland_1_23"] } | |
| 97 | 98 | xcursor = "0.3.10" |
| 98 | 99 | zbus = { version = "5.13.2", optional = true } |
| 99 | 100 |
src/main.rsmodified+4 -0
| @@ -169,6 +169,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
| 169 | 169 | |
| 170 | 170 | // Create the compositor. |
| 171 | 171 | let display = Display::new().unwrap(); |
| 172 | + | |
| 173 | + // Increase the buffer size so that it's harder to crash a frozen client with a 1000 Hz mouse. | |
| 174 | + display.handle().set_default_max_buffer_size(1024 * 1024); | |
| 175 | + | |
| 172 | 176 | let mut state = State::new( |
| 173 | 177 | config, |
| 174 | 178 | event_loop.handle(), |