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.
This commit is contained in:
Ivan Molodetskikh
2024-05-29 13:32:11 +03:00
parent 22a948cc75
commit e3406ac255
10 changed files with 78 additions and 49 deletions
+4 -3
View File
@@ -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();