Improve the check for another window manager
commit65a6febaf50d671a5f2d24e841646b46eb8b2620
authorUli Schlachter <psychon@znc.in>
Sat, 1 Mar 2014 16:29:00 +0000 (1 17:29 +0100)
committerUli Schlachter <psychon@znc.in>
Sat, 1 Mar 2014 16:29:00 +0000 (1 17:29 +0100)
treef72d48d7ce7e8e1ff117912cd2b53cafb6cd77e0
parenta54636751bef17ad6bbde266ab1d35ad0ad36c0d
Improve the check for another window manager

We detect other WMs when we fail to request SubstructureRedirect on the root
window. Previously, the code used an unchecked request and then tried to
cleverly detect if an error occurred. This isn't needed.

Instead, we now use a checked request and use xcb_request_check() to see if any
errors were generated. This also gets rid of a round-trip to the server (one is
still implicitly done by xcb_request_check()).

Signed-off-by: Uli Schlachter <psychon@znc.in>
awesome.c