refactor resolution, mid commit

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-05-17 23:19:20 +08:00
parent 154b86d2a5
commit a603e046e3
9 changed files with 196 additions and 55 deletions

View File

@@ -88,10 +88,7 @@ impl<T: InvokeUiSession> Session<T> {
}
pub fn is_port_forward(&self) -> bool {
let conn_type = self.lc
.read()
.unwrap()
.conn_type;
let conn_type = self.lc.read().unwrap().conn_type;
conn_type == ConnType::PORT_FORWARD || conn_type == ConnType::RDP
}
@@ -833,6 +830,10 @@ impl<T: InvokeUiSession> Session<T> {
}
pub fn change_resolution(&self, width: i32, height: i32) {
self.lc
.write()
.unwrap()
.set_custom_resolution(Some((width, height)));
let mut misc = Misc::new();
misc.set_change_resolution(Resolution {
width,