cloud storage client
git clone https://git.lucas.co/cce-cloud.git
Set wl_surface buffer scale to align with HiDPI display scale factor
src/main.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main.rs b/src/main.rs
index 7186528..75904bc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -418,6 +418,7 @@ impl State {
let lh = height as f32;
let wl_surface = compositor_state.create_surface(qh);
+ wl_surface.set_buffer_scale(scale as i32);
let window = layer_shell_state.create_layer_surface(
qh,
wl_surface.clone(),
@@ -803,6 +804,7 @@ impl CompositorHandler for AppState {
) {
if let Some(state) = &mut self.state {
state.scale = scale_factor as f64;
+ state.wl_surface.set_buffer_scale(scale_factor);
let pw = (state.width as f64 * state.scale) as u32;
let ph = (state.height as f64 * state.scale) as u32;
state.resize(pw, ph);