1
0
Fork 0
forked from wry/wry

xwayland: allow windows to scale themselves

This commit is contained in:
Julian Orth 2024-10-08 11:14:13 +02:00
parent cc8db84289
commit 19b07fa7dc
40 changed files with 800 additions and 80 deletions

View file

@ -27,6 +27,7 @@ use {
connector_type::{ConnectorType, CON_UNKNOWN},
Connector, DrmDevice, Format, GfxApi, Mode, TearingMode, Transform, VrrMode,
},
xwayland::XScalingMode,
Axis, Direction, ModifiedKeySym, PciId, Workspace,
},
bincode::Options,
@ -816,6 +817,10 @@ impl Client {
(width, height)
}
pub fn set_x_scaling_mode(&self, mode: XScalingMode) {
self.send(&ClientMessage::SetXScalingMode { mode })
}
pub fn set_vrr_mode(&self, connector: Option<Connector>, mode: VrrMode) {
self.send(&ClientMessage::SetVrrMode { connector, mode })
}

View file

@ -14,6 +14,7 @@ use {
},
Axis, Direction, PciId, Workspace,
_private::{PollableId, WireMode},
xwayland::XScalingMode,
},
serde::{Deserialize, Serialize},
std::time::Duration,
@ -523,6 +524,9 @@ pub enum ClientMessage<'a> {
SetUiDragThreshold {
threshold: i32,
},
SetXScalingMode {
mode: XScalingMode,
},
}
#[derive(Serialize, Deserialize, Debug)]