ei: add support for libei
This commit is contained in:
parent
084fe50259
commit
40e87f8f91
69 changed files with 4340 additions and 72 deletions
|
|
@ -992,6 +992,10 @@ impl Client {
|
|||
keymap
|
||||
}
|
||||
|
||||
pub fn set_ei_socket_enabled(&self, enabled: bool) {
|
||||
self.send(&ClientMessage::SetEiSocketEnabled { enabled })
|
||||
}
|
||||
|
||||
pub fn latch<F: FnOnce() + 'static>(&self, seat: Seat, f: F) {
|
||||
if !self.feat_mod_mask.get() {
|
||||
log::error!("compositor does not support latching");
|
||||
|
|
|
|||
|
|
@ -506,6 +506,9 @@ pub enum ClientMessage<'a> {
|
|||
device: InputDevice,
|
||||
matrix: [[f32; 3]; 2],
|
||||
},
|
||||
SetEiSocketEnabled {
|
||||
enabled: bool,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
|
|
@ -564,3 +564,12 @@ pub enum SwitchEvent {
|
|||
/// event of this kind is generated.
|
||||
ConvertedToTablet,
|
||||
}
|
||||
|
||||
/// Enables or disables the unauthenticated libei socket.
|
||||
///
|
||||
/// Even if the socket is disabled, application can still request access via the portal.
|
||||
///
|
||||
/// The default is `false`.
|
||||
pub fn set_libei_socket_enabled(enabled: bool) {
|
||||
get!().set_ei_socket_enabled(enabled);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue