Function wlc_with_elogind::init [] [src]

pub fn init<T: Callback + 'static>(callbacks: T) -> Result<Wlc, Error>

Initialize Wlc. Returns wlc::Error on failure.

Warning

Avoid running unverified code before wlc::init as wlc compositor may be run with higher privileges on non logind systems where compositor binary needs to be suid. wlc::init's purpose is to initialize and drop privileges as soon as possible.

Safety

Dont call this function on another thread, then the main thread. The whole library is bound to the main thread and neither Send or Sync !

Notes

  • The Callbacks may not be changed later on
  • Dropping the return value - letting it go out of scope - starts the actual compositor in a blocking fashion.