mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
Hardcode winit transform for now
This commit is contained in:
@@ -16,7 +16,6 @@ use smithay::reexports::calloop::LoopHandle;
|
||||
use smithay::reexports::wayland_protocols::wp::presentation_time::server::wp_presentation_feedback;
|
||||
use smithay::reexports::winit::dpi::LogicalSize;
|
||||
use smithay::reexports::winit::window::WindowBuilder;
|
||||
use smithay::utils::Transform;
|
||||
|
||||
use super::RenderResult;
|
||||
use crate::niri::{RedrawState, State};
|
||||
@@ -54,7 +53,7 @@ impl Winit {
|
||||
size: backend.window_size(),
|
||||
refresh: 60_000,
|
||||
};
|
||||
output.change_current_state(Some(mode), Some(Transform::Flipped180), None, None);
|
||||
output.change_current_state(Some(mode), None, None, None);
|
||||
output.set_preferred(mode);
|
||||
|
||||
let physical_properties = output.physical_properties();
|
||||
|
||||
+10
-2
@@ -654,9 +654,13 @@ impl State {
|
||||
let scale = config.map(|c| c.scale).unwrap_or(1.);
|
||||
let scale = scale.clamp(1., 10.).ceil() as i32;
|
||||
|
||||
let transform = config
|
||||
let mut transform = config
|
||||
.map(|c| c.transform.into())
|
||||
.unwrap_or(Transform::Normal);
|
||||
// FIXME: fix winit damage on other transforms.
|
||||
if name == "winit" {
|
||||
transform = Transform::Flipped180;
|
||||
}
|
||||
|
||||
if output.current_scale().integer_scale() != scale
|
||||
|| output.current_transform() != transform
|
||||
@@ -1179,7 +1183,11 @@ impl Niri {
|
||||
let c = config.outputs.iter().find(|o| o.name == name);
|
||||
let scale = c.map(|c| c.scale).unwrap_or(1.);
|
||||
let scale = scale.clamp(1., 10.).ceil() as i32;
|
||||
let transform = c.map(|c| c.transform.into()).unwrap_or(Transform::Normal);
|
||||
let mut transform = c.map(|c| c.transform.into()).unwrap_or(Transform::Normal);
|
||||
// FIXME: fix winit damage on other transforms.
|
||||
if name == "winit" {
|
||||
transform = Transform::Flipped180;
|
||||
}
|
||||
drop(config);
|
||||
|
||||
// Set scale and transform before adding to the layout since that will read the output size.
|
||||
|
||||
Reference in New Issue
Block a user