arminfriedl / xcb-wm

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

Don't panic when a value isn't send in a GetPropertyReply, instead use the default value #9

Open Philipp-M opened 1 year ago

Philipp-M commented 1 year ago

I had quite a few panics, mostly when accessing something like name (IconName or WindowName). I don't think it's a good practice to just panic there, as it kind of seems to be allowed that parameters are sometimes optional. I'm not sure which parameter is really optional, so also to not change the API I'll just use default values, it almost always still makes sense (empty name, or width/height == 0).

Also applied a few clippy lints on the way...