metal: preserve mode across reconnects
This commit is contained in:
parent
c81f35bdf1
commit
9bab4f7ce1
11 changed files with 148 additions and 107 deletions
|
|
@ -80,9 +80,9 @@ impl JayRandr {
|
|||
None => {
|
||||
self.client.event(NonDesktopOutput {
|
||||
self_id: self.id,
|
||||
manufacturer: &output.monitor_info.manufacturer,
|
||||
product: &output.monitor_info.product,
|
||||
serial_number: &output.monitor_info.serial_number,
|
||||
manufacturer: &output.monitor_info.output_id.manufacturer,
|
||||
product: &output.monitor_info.output_id.model,
|
||||
serial_number: &output.monitor_info.output_id.serial_number,
|
||||
width_mm: output.monitor_info.width_mm,
|
||||
height_mm: output.monitor_info.height_mm,
|
||||
});
|
||||
|
|
@ -99,9 +99,9 @@ impl JayRandr {
|
|||
x: pos.x1(),
|
||||
y: pos.y1(),
|
||||
transform: global.persistent.transform.get().to_wl(),
|
||||
manufacturer: &output.monitor_info.manufacturer,
|
||||
product: &output.monitor_info.product,
|
||||
serial_number: &output.monitor_info.serial_number,
|
||||
manufacturer: &output.monitor_info.output_id.manufacturer,
|
||||
product: &output.monitor_info.output_id.model,
|
||||
serial_number: &output.monitor_info.output_id.serial_number,
|
||||
width_mm: global.width_mm,
|
||||
height_mm: global.height_mm,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -96,14 +96,30 @@ pub struct PersistentOutputState {
|
|||
pub tearing_mode: Cell<&'static TearingMode>,
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Hash)]
|
||||
#[derive(Eq, PartialEq, Hash, Debug)]
|
||||
pub struct OutputId {
|
||||
pub connector: String,
|
||||
pub connector: Option<String>,
|
||||
pub manufacturer: String,
|
||||
pub model: String,
|
||||
pub serial_number: String,
|
||||
}
|
||||
|
||||
impl OutputId {
|
||||
pub fn new(
|
||||
connector: String,
|
||||
manufacturer: String,
|
||||
model: String,
|
||||
serial_number: String,
|
||||
) -> Self {
|
||||
Self {
|
||||
connector: serial_number.is_empty().then_some(connector),
|
||||
manufacturer,
|
||||
model,
|
||||
serial_number,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl WlOutputGlobal {
|
||||
pub fn clear(&self) {
|
||||
self.opt.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue