arminfriedl / xcb-wm

Rust implementation of xcb-wm - icccm and ewmh extensions for xcb
MIT License
5 stars 3 forks source link

Connection.wait_for_reply panic if property is not set #1

Closed fiorematteo closed 2 years ago

fiorematteo commented 2 years ago

As per title, when I try to wait on a property that isn't set wait_for_reply panics instead of returning a Result like rust-xcb.

Looking at the source code I can see that the method is really just calling the xcb-connection with cookie.inner() and then using unwrap on the Result. Since inner is hidden behind a private trait I can't easily implement my version of wait_for_reply.

arminfriedl commented 2 years ago

Hi @fiorematteo. Thanks for reporting.

You are right, the intention here would be to return a Result like the parent rust-xcb in the end. I will change that when I have some time (PRs are welcome as well of course). You shouldn't need to implement your own version. This is clearly a bug (or better said, was deferred for later).

(Please be aware xcb-wm is still very alpha in general)