Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Damage error #221

Open
sganis opened this issue Feb 18, 2023 · 3 comments
Open

Damage error #221

sganis opened this issue Feb 18, 2023 · 3 comments

Comments

@sganis
Copy link

sganis commented Feb 18, 2023

Is there any example on how to use the xdamage extension?

This request fails:

let damage: xcb::damage::Damage = conn.generate_id();   
conn.send_request(&xcb::damage::Create {
        damage,
        drawable: x::Drawable::Window(window),
        level: xcb::damage::ReportLevel::DeltaRectangles
});

Error in first call of conn.wait_for_event():

Protocol(
    X(
        Request(
            RequestError {
                response_type: 0,
                error_code: 1,
                sequence: 15,
                bad_value: 67108864,
                minor_opcode: 1,
                major_opcode: 144,
                pad: 1,
            },
        ),
        Some(
            "damage::Create",
        ),
    ),
)
@rtbo
Copy link
Collaborator

rtbo commented Mar 9, 2023

There is no example and I've never used this extension.
If you point me to simple example in C I can adapt to Rust and try to see what's wrong

@sganis
Copy link
Author

sganis commented Mar 10, 2023

@Maxdamantus
Copy link

@sganis The failure is probably because the damage extension seems to require the client to send a QueryVersion request before use (I don't think this is the case with other extensions).

My related issue #228 contains some example code. Note that due to this issue, you need to be careful if handling the NotifyEvent::level() (or printing it using Debug), but the extension should otherwise be usable.

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

No branches or pull requests

3 participants