xwayland: Always allow writing into clipboard
Overriding contents is no security issue and this is necessary for a bunch of apps to work correctly.
This commit is contained in:
parent
2e2ca3eda0
commit
8d733a1245
1 changed files with 14 additions and 16 deletions
|
|
@ -762,22 +762,20 @@ impl XwmHandler for State {
|
||||||
fn new_selection(&mut self, xwm: XwmId, selection: SelectionTarget, mime_types: Vec<String>) {
|
fn new_selection(&mut self, xwm: XwmId, selection: SelectionTarget, mime_types: Vec<String>) {
|
||||||
trace!(?selection, ?mime_types, "Got Selection from Xwayland",);
|
trace!(?selection, ?mime_types, "Got Selection from Xwayland",);
|
||||||
|
|
||||||
if self.common.is_x_focused(xwm) {
|
let seat = self
|
||||||
let seat = self
|
.common
|
||||||
.common
|
.shell
|
||||||
.shell
|
.read()
|
||||||
.read()
|
.unwrap()
|
||||||
.unwrap()
|
.seats
|
||||||
.seats
|
.last_active()
|
||||||
.last_active()
|
.clone();
|
||||||
.clone();
|
match selection {
|
||||||
match selection {
|
SelectionTarget::Clipboard => {
|
||||||
SelectionTarget::Clipboard => {
|
set_data_device_selection(&self.common.display_handle, &seat, mime_types, xwm)
|
||||||
set_data_device_selection(&self.common.display_handle, &seat, mime_types, xwm)
|
}
|
||||||
}
|
SelectionTarget::Primary => {
|
||||||
SelectionTarget::Primary => {
|
set_primary_selection(&self.common.display_handle, &seat, mime_types, xwm)
|
||||||
set_primary_selection(&self.common.display_handle, &seat, mime_types, xwm)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue