Skip to content

Conversation

malwrar
Copy link

@malwrar malwrar commented Oct 26, 2020

Didn't test this too much, but it looks like the x11 crate bindings work on my end. Some test code:

use std::ptr::{null};
use std::os::raw::c_int;
use x11::xlib::*;
use x11::xcomposite::*;

fn main() {
    unsafe {
        let mut event_base_return: c_int = 0;
        let mut error_base_return: c_int = 0;

        let display = XOpenDisplay(null());
        if display.is_null() {
            panic!("Failed to open default X display.");
        }

        XCompositeQueryExtension(display, &mut event_base_return, &mut error_base_return);
        let xcomposite_version = XCompositeVersion();

        println!("{} {}", event_base_return, error_base_return);
        println!("{}", xcomposite_version);
    }
}

@LoganDark

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants