1
0
Fork 0
forked from wry/wry

head-management: add compositor-space-scaler-v1 extension

This commit is contained in:
Julian Orth 2025-07-12 09:24:45 +02:00
parent a12b259648
commit a8ed4785af
11 changed files with 120 additions and 9 deletions

View file

@ -15,7 +15,7 @@ impl Default for Scale {
}
impl Scale {
pub fn from_int(f: u32) -> Self {
pub const fn from_int(f: u32) -> Self {
Self(f.saturating_mul(BASE))
}
@ -31,7 +31,7 @@ impl Scale {
self.0.saturating_add(BASE - 1) / BASE
}
pub fn from_wl(wl: u32) -> Self {
pub const fn from_wl(wl: u32) -> Self {
Self(wl)
}