Major refactor of locker
Moves the meat of the screensaver into its own file, and separates out the subservice stuff.
This commit is contained in:
@ -95,8 +95,12 @@ impl<'a> Embedder<'a> {
|
||||
flags: info.flags,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn end(mut self) -> Result<(), Error> {
|
||||
self.end_internal()
|
||||
}
|
||||
|
||||
pub fn end(self) -> Result<(), Error> {
|
||||
fn end_internal(&mut self) -> Result<(), Error> {
|
||||
if self.client == x::WINDOW_NONE {
|
||||
return Err(Error::ClientDestroyed);
|
||||
}
|
||||
@ -290,6 +294,12 @@ impl<'a> Embedder<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Drop for Embedder<'a> {
|
||||
fn drop(&mut self) {
|
||||
let _ = self.end_internal();
|
||||
}
|
||||
}
|
||||
|
||||
fn fetch_xembed_info(conn: &xcb::Connection, client: x::Window) -> Result<XEmbedInfo, Error> {
|
||||
let xembed_info_atom = intern_atom(conn, XEMBED_INFO_ATOM_NAME)?;
|
||||
let cookie = conn.send_request(&x::GetProperty {
|
||||
|
Reference in New Issue
Block a user