Allow warnings in desktop_util.cpp.

The code uses some macros that can result in old-style or useless casts.
Don't use an implicit cast to bool.

This fails to compile using C++11, since boost::shared_ptr there has an
explicit operator bool.