Skip to content

Commit

Permalink
Update surface scale in the example (PolyMeilex#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex authored Nov 27, 2023
1 parent 233b3e2 commit c8a984e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,14 @@ impl CompositorHandler for SimpleWindow {
&mut self,
_conn: &Connection,
_qh: &QueueHandle<Self>,
_surface: &wl_surface::WlSurface,
_new_factor: i32,
surface: &wl_surface::WlSurface,
new_factor: i32,
) {
// Not needed for this example.
if self.window.wl_surface() == surface {
if let Some(frame) = self.window_frame.as_mut() {
frame.set_scaling_factor(new_factor as f64);
}
}
}

fn transform_changed(
Expand Down

0 comments on commit c8a984e

Please sign in to comment.