-
-
Notifications
You must be signed in to change notification settings - Fork 21
Add output enable/disable signal and change the current ones #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -179,6 +179,10 @@ impl Pinnacle { | |||||
) { | ||||||
let _span = tracy_client::span!("Pinnacle::change_output_state"); | ||||||
|
||||||
if let Some(_mode) = mode { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
self.set_output_enabled(output, true); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not a fan of this being here. If the output was explicitly disabled I don't think I'd want a mode change to re-enable it; I'd expect it to stay disabled. |
||||||
} | ||||||
|
||||||
// Calculate the ratio that the pointer location was over the output's size | ||||||
// so we can warp it if the output moves | ||||||
let pointer_loc_ratio = self.seat.get_pointer().and_then(|ptr| { | ||||||
|
@@ -308,23 +312,19 @@ 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 | ||||||
// instead of connect and disconnect | ||||||
if should_signal { | ||||||
self.signal_state.output_connect.signal(output); | ||||||
} | ||||||
|
||||||
self.signal_state.output_enable.signal(output); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be in the |
||||||
} else { | ||||||
if let Some(global) = output.with_state_mut(|state| state.enabled_global_id.take()) { | ||||||
self.display_handle.remove_global::<State>(global); | ||||||
} | ||||||
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 | ||||||
// instead of connect and disconnect | ||||||
self.signal_state.output_disconnect.signal(output); | ||||||
// Trigger the disable signal here for configs to reposition outputs | ||||||
self.signal_state.output_disable.signal(output); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be in the if block above for the same reason above. |
||||||
|
||||||
self.gamma_control_manager_state.output_removed(output); | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Powered != enable/disable, so this should be removed.