aboutsummaryrefslogtreecommitdiff
path: root/src/handlers/layer_shell.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-05-29 13:32:11 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-06-10 18:08:00 +0300
commite3406ac2556c7f68cd00f11b5856222dcce7f680 (patch)
tree06926e2b098d98b780345569bdfbf56a92c3c392 /src/handlers/layer_shell.rs
parent22a948cc759498923c1e9806580962cdd2d7b3e2 (diff)
downloadniri-e3406ac2556c7f68cd00f11b5856222dcce7f680.tar.gz
niri-e3406ac2556c7f68cd00f11b5856222dcce7f680.tar.bz2
niri-e3406ac2556c7f68cd00f11b5856222dcce7f680.zip
Signal fractional scale to clients
Doesn't do anything yet because we don't bind the fractional scale manager and don't allow fractional scales.
Diffstat (limited to 'src/handlers/layer_shell.rs')
-rw-r--r--src/handlers/layer_shell.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/handlers/layer_shell.rs b/src/handlers/layer_shell.rs
index 7862a9fe..ae4ffe66 100644
--- a/src/handlers/layer_shell.rs
+++ b/src/handlers/layer_shell.rs
@@ -3,7 +3,7 @@ use smithay::desktop::{layer_map_for_output, LayerSurface, PopupKind, WindowSurf
use smithay::output::Output;
use smithay::reexports::wayland_server::protocol::wl_output::WlOutput;
use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;
-use smithay::wayland::compositor::{send_surface_state, with_states};
+use smithay::wayland::compositor::with_states;
use smithay::wayland::shell::wlr_layer::{
Layer, LayerSurface as WlrLayerSurface, LayerSurfaceData, WlrLayerShellHandler,
WlrLayerShellState,
@@ -11,6 +11,7 @@ use smithay::wayland::shell::wlr_layer::{
use smithay::wayland::shell::xdg::PopupSurface;
use crate::niri::State;
+use crate::utils::send_scale_transform;
impl WlrLayerShellHandler for State {
fn shell_state(&mut self) -> &mut WlrLayerShellState {
@@ -103,10 +104,10 @@ impl State {
.layer_for_surface(surface, WindowSurfaceType::TOPLEVEL)
.unwrap();
- let scale = output.current_scale().integer_scale();
+ let scale = output.current_scale();
let transform = output.current_transform();
with_states(surface, |data| {
- send_surface_state(surface, data, scale, transform);
+ send_scale_transform(surface, data, scale, transform);
});
layer.layer_surface().send_configure();