X11: Flatten window model (#536)
This commit is contained in:
parent
30f798b246
commit
4372f6fdac
5 changed files with 360 additions and 444 deletions
|
|
@ -31,6 +31,16 @@ use std::os::raw::*;
|
|||
|
||||
use super::{ffi, XConnection, XError};
|
||||
|
||||
pub fn maybe_change<T: PartialEq>(field: &mut Option<T>, value: T) -> bool {
|
||||
let wrapped = Some(value);
|
||||
if *field != wrapped {
|
||||
*field = wrapped;
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use = "This request was made asynchronously, and is still in the output buffer. You must explicitly choose to either `.flush()` (empty the output buffer, sending the request now) or `.queue()` (wait to send the request, allowing you to continue to add more requests without additional round-trips). For more information, see the documentation for `util::flush_requests`."]
|
||||
pub struct Flusher<'a> {
|
||||
xconn: &'a XConnection,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue