cli: add randr subcommand
This commit is contained in:
parent
5b2bfb8531
commit
20ac21e412
14 changed files with 1053 additions and 17 deletions
|
|
@ -53,10 +53,6 @@ impl Connector for DummyOutput {
|
|||
None
|
||||
}
|
||||
|
||||
fn set_enabled(&self, _enabled: bool) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
fn set_mode(&self, _mode: Mode) {
|
||||
// nothing
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,6 +130,10 @@ impl BackendDrmDevice for MetalDrmDevice {
|
|||
fn set_direct_scanout_enabled(&self, enabled: bool) {
|
||||
self.direct_scanout_enabled.set(Some(enabled));
|
||||
}
|
||||
|
||||
fn is_render_device(&self) -> bool {
|
||||
Some(self.id) == self.backend.ctx.get().map(|c| c.dev_id)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct HandleEvents {
|
||||
|
|
@ -846,6 +850,10 @@ impl Connector for MetalConnector {
|
|||
Some(self.dev.id)
|
||||
}
|
||||
|
||||
fn enabled(&self) -> bool {
|
||||
self.enabled.get()
|
||||
}
|
||||
|
||||
fn set_enabled(&self, enabled: bool) {
|
||||
if self.enabled.replace(enabled) != enabled {
|
||||
if self.display.borrow_mut().connection == ConnectorStatus::Connected {
|
||||
|
|
|
|||
|
|
@ -994,6 +994,10 @@ impl BackendDrmDevice for XDrmDevice {
|
|||
fn set_direct_scanout_enabled(&self, enabled: bool) {
|
||||
let _ = enabled;
|
||||
}
|
||||
|
||||
fn is_render_device(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
struct XOutput {
|
||||
|
|
@ -1055,10 +1059,6 @@ impl Connector for XOutput {
|
|||
Some(self.backend.drm_device_id)
|
||||
}
|
||||
|
||||
fn set_enabled(&self, _enabled: bool) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
fn set_mode(&self, _mode: Mode) {
|
||||
log::warn!("X backend doesn't support changing the connector mode");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue