wayland: restrict input method global to privileged applications
This commit is contained in:
parent
077651dd80
commit
be5c2bc99a
2 changed files with 6 additions and 1 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue