mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-13 08:01:05 +01:00
Send output (dis)connect signal on enable/disable
Temporary until I add output enable/disable signals
This commit is contained in:
parent
6c21f49177
commit
d037fa25b2
1 changed files with 19 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
use std::{cell::RefCell, num::NonZeroU32};
|
||||
|
||||
use pinnacle_api_defs::pinnacle::signal::v0alpha1::{
|
||||
OutputDisconnectResponse, OutputMoveResponse, OutputResizeResponse,
|
||||
OutputConnectResponse, OutputDisconnectResponse, OutputMoveResponse, OutputResizeResponse,
|
||||
};
|
||||
use smithay::{
|
||||
desktop::layer_map_for_output,
|
||||
|
@ -255,6 +255,15 @@ impl Pinnacle {
|
|||
}
|
||||
}
|
||||
self.space.map_output(output, output.current_location());
|
||||
|
||||
// Trigger the connect signal here for configs to reposition outputs
|
||||
//
|
||||
// TODO: Create a new output_disable/enable signal and trigger it here
|
||||
self.signal_state.output_connect.signal(|buffer| {
|
||||
buffer.push_back(OutputConnectResponse {
|
||||
output_name: Some(output.name()),
|
||||
})
|
||||
});
|
||||
} else {
|
||||
let global = self.outputs.get_mut(output);
|
||||
if let Some(global) = global {
|
||||
|
@ -264,6 +273,15 @@ impl Pinnacle {
|
|||
}
|
||||
self.space.unmap_output(output);
|
||||
|
||||
// Trigger the disconnect signal here for configs to reposition outputs
|
||||
//
|
||||
// TODO: Create a new output_disable/enable signal and trigger it here
|
||||
self.signal_state.output_disconnect.signal(|buffer| {
|
||||
buffer.push_back(OutputDisconnectResponse {
|
||||
output_name: Some(output.name()),
|
||||
})
|
||||
});
|
||||
|
||||
self.gamma_control_manager_state.output_removed(output);
|
||||
|
||||
self.config.connector_saved_states.insert(
|
||||
|
|
Loading…
Reference in a new issue