Merge pull request #209 from mahkoh/jorth/input-method-cap
wayland: restrict input method global to privileged applications
This commit is contained in:
commit
53b7d3c805
3 changed files with 10 additions and 2 deletions
|
|
@ -56,6 +56,7 @@ bitflags! {
|
|||
CAP_SCREENCOPY_MANAGER = 1 << 7,
|
||||
CAP_SEAT_MANAGER = 1 << 8,
|
||||
CAP_DRM_LEASE = 1 << 9,
|
||||
CAP_INPUT_METHOD = 1 << 10,
|
||||
}
|
||||
|
||||
pub const CAPS_DEFAULT: ClientCaps = ClientCaps(CAP_LAYER_SHELL.0 | CAP_DRM_LEASE.0);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use {
|
||||
crate::{
|
||||
client::{Client, ClientError},
|
||||
client::{Client, ClientCaps, ClientError, CAP_INPUT_METHOD},
|
||||
globals::{Global, GlobalName},
|
||||
ifs::wl_seat::text_input::{zwp_input_method_v2::ZwpInputMethodV2, TextConnectReason},
|
||||
leaks::Tracker,
|
||||
|
|
@ -59,6 +59,10 @@ impl Global for ZwpInputMethodManagerV2Global {
|
|||
fn version(&self) -> u32 {
|
||||
1
|
||||
}
|
||||
|
||||
fn required_caps(&self) -> ClientCaps {
|
||||
CAP_INPUT_METHOD
|
||||
}
|
||||
}
|
||||
|
||||
simple_add_global!(ZwpInputMethodManagerV2Global);
|
||||
|
|
|
|||
|
|
@ -237,7 +237,10 @@ impl GbmDevice {
|
|||
return Err(GbmError::CreateBo(OsError::default()));
|
||||
}
|
||||
let bo = BoHolder { bo };
|
||||
let dma = export_bo(dma_buf_ids, bo.bo)?;
|
||||
let mut dma = export_bo(dma_buf_ids, bo.bo)?;
|
||||
if modifiers.is_null() {
|
||||
dma.modifier = INVALID_MODIFIER;
|
||||
}
|
||||
Ok(GbmBo { bo, dmabuf: dma })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue