Expose wlr-data-control-unstable-v1 to non-sandboxed clients
Some users have complained about not supporting clipboard managers. But this was possible, but hidden under the `COSMIC_DATA_CONTROL_ENABLED` env var. Since the security context protocol exists now to provide a way to not expose a protocol like this to sandboxed clients, it should be safe to expose this now.
This commit is contained in:
parent
f82db23f4a
commit
d2d7c655ac
2 changed files with 7 additions and 7 deletions
12
src/state.rs
12
src/state.rs
|
|
@ -234,7 +234,7 @@ pub struct Common {
|
|||
pub output_power_state: OutputPowerState,
|
||||
pub presentation_state: PresentationState,
|
||||
pub primary_selection_state: PrimarySelectionState,
|
||||
pub data_control_state: Option<DataControlState>,
|
||||
pub data_control_state: DataControlState,
|
||||
pub image_capture_source_state: ImageCaptureSourceState,
|
||||
pub screencopy_state: ScreencopyState,
|
||||
pub seat_state: SeatState<State>,
|
||||
|
|
@ -651,11 +651,11 @@ impl State {
|
|||
let idle_inhibit_manager_state = IdleInhibitManagerState::new::<State>(dh);
|
||||
let idle_inhibiting_surfaces = HashSet::new();
|
||||
|
||||
let data_control_state = crate::utils::env::bool_var("COSMIC_DATA_CONTROL_ENABLED")
|
||||
.unwrap_or(false)
|
||||
.then(|| {
|
||||
DataControlState::new::<Self, _>(dh, Some(&primary_selection_state), |_| true)
|
||||
});
|
||||
let data_control_state = DataControlState::new::<Self, _>(
|
||||
dh,
|
||||
Some(&primary_selection_state),
|
||||
client_not_sandboxed,
|
||||
);
|
||||
|
||||
let shell = Arc::new(parking_lot::RwLock::new(Shell::new(&config)));
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use smithay::{
|
|||
|
||||
impl DataControlHandler for State {
|
||||
fn data_control_state(&mut self) -> &mut DataControlState {
|
||||
self.common.data_control_state.as_mut().unwrap()
|
||||
&mut self.common.data_control_state
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue