X11: Continuous Presentation (#7762)

Alternative to #7758, which doesn't involve adding a new trait method
`request_draw`.
Somehow, my whole screen goes blinking black with this when moving the
window, so not ready for landing.

Release Notes:
- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Dzmitry Malyshau 2024-02-14 12:24:12 -08:00 committed by GitHub
parent 181f556269
commit 8f7a26f397
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 78 additions and 23 deletions

View file

@ -64,7 +64,9 @@ impl Default for LinuxPlatform {
impl LinuxPlatform {
pub(crate) fn new() -> Self {
let (xcb_connection, x_root_index) = xcb::Connection::connect(None).unwrap();
let (xcb_connection, x_root_index) =
xcb::Connection::connect_with_extensions(None, &[xcb::Extension::Present], &[])
.unwrap();
let atoms = XcbAtoms::intern_all(&xcb_connection).unwrap();
let xcb_connection = Arc::new(xcb_connection);