xwayland: allow windows to scale themselves
This commit is contained in:
parent
cc8db84289
commit
19b07fa7dc
40 changed files with 800 additions and 80 deletions
|
|
@ -737,3 +737,23 @@ macro_rules! ei_object_base {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! logical_to_client_wire_scale {
|
||||
($client:expr, $($field:expr),+ $(,)?) => {
|
||||
if let Some(scale) = $client.wire_scale.get() {
|
||||
$(
|
||||
$field = $field * scale;
|
||||
)+
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! client_wire_scale_to_logical {
|
||||
($client:expr, $($field:expr),+ $(,)?) => {
|
||||
if let Some(scale) = $client.wire_scale.get() {
|
||||
$(
|
||||
$field = $field / scale;
|
||||
)+
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue