forge
Explore
Log in

Don't you dare go Hollow

Increase default Wayland buffer size

Browse files at this commit

b82d52705e1424cf47b26dd7b096832901c31f56Ivan MolodetskikhParent: c7fa5f2
The buffer size matches the one used in other compositors, e.g.:

- https://gitlab.gnome.org/GNOME/mutter/-/blob/49.4/src/wayland/meta-wayland.c?ref_type=tags#L970-971
Cargo.lockmodified+1 -0
@@ -2258,6 +2258,7 @@ dependencies = [
22582258 "wayland-backend",
22592259 "wayland-client",
22602260 "wayland-scanner",
2261+ "wayland-server",
22612262 "xcursor",
22622263 "xshell",
22632264 "zbus",
Cargo.tomlmodified+1 -0
@@ -94,6 +94,7 @@ tracing.workspace = true
9494 tracy-client.workspace = true
9595 wayland-backend = "0.3.14"
9696 wayland-scanner = "0.31.9"
97+wayland-server = { version = "0.31.12", features = ["libwayland_1_23"] }
9798 xcursor = "0.3.10"
9899 zbus = { version = "5.13.2", optional = true }
99100
src/main.rsmodified+4 -0
@@ -169,6 +169,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
169169
170170 // Create the compositor.
171171 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+
172176 let mut state = State::new(
173177 config,
174178 event_loop.handle(),