diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-11-18 17:45:55 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-11-18 17:46:02 +0300 |
| commit | 262cca6ad42e88e45bc65ad9b51602d156e0391b (patch) | |
| tree | 571d7f97af649630042e188a6d5bfe5a00101946 /src/utils/mod.rs | |
| parent | c256842761b8b7eba7c8663cd1b02fcf3ab75ea0 (diff) | |
| download | niri-262cca6ad42e88e45bc65ad9b51602d156e0391b.tar.gz niri-262cca6ad42e88e45bc65ad9b51602d156e0391b.tar.bz2 niri-262cca6ad42e88e45bc65ad9b51602d156e0391b.zip | |
tty: Honor "panel orientation" property
Diffstat (limited to 'src/utils/mod.rs')
| -rw-r--r-- | src/utils/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 4a7b4b6f..9a32e60f 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -173,6 +173,15 @@ pub fn logical_output(output: &Output) -> niri_ipc::LogicalOutput { } } +pub struct PanelOrientation(pub Transform); +pub fn panel_orientation(output: &Output) -> Transform { + output + .user_data() + .get::<PanelOrientation>() + .map(|x| x.0) + .unwrap_or(Transform::Normal) +} + pub fn ipc_transform_to_smithay(transform: niri_ipc::Transform) -> Transform { match transform { niri_ipc::Transform::Normal => Transform::Normal, |
