Skip to content

CleanCode: simplify X error trapping

Enrico Weigelt requested to merge metux/xfwm4:submit/simplify_xerror_trap into master

We've got many dozens of places where X error traps are pushed before doing xlib calls and then ignored afterwards, which makes the code hard to read and easy to forget some trapping. Only few places are actually interested in the errors and ask for them.

It's much easier to add a trap right at the startup (which is never pop'ed) and push a second layer (that is pop'ed w/ retrieving the error) only where it's really needed.

Signed-off-by: Enrico Weigelt, metux IT consult info@metux.net

Merge request reports

Loading