Enum wayland_protocols_wlr::layer_shell::v1::server::zwlr_layer_surface_v1::KeyboardInteractivity
source · #[repr(u32)]#[non_exhaustive]pub enum KeyboardInteractivity {
None,
Exclusive,
OnDemand,
}
server
only.Expand description
types of keyboard interaction possible for a layer shell surface
Types of keyboard interaction possible for layer shell surfaces. The rationale for this is twofold: (1) some applications are not interested in keyboard events and not allowing them to be focused can improve the desktop experience; (2) some applications will want to take exclusive keyboard focus.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
no keyboard focus is possible
This value indicates that this surface is not interested in keyboard events and the compositor should never assign it the keyboard focus.
This is the default value, set for newly created layer shell surfaces.
This is useful for e.g. desktop widgets that display information or only have interaction with non-keyboard input devices.
Exclusive
request exclusive keyboard focus
Request exclusive keyboard focus if this surface is above the shell surface layer.
For the top and overlay layers, the seat will always give exclusive keyboard focus to the top-most layer which has keyboard interactivity set to exclusive. If this layer contains multiple surfaces with keyboard interactivity set to exclusive, the compositor determines the one receiving keyboard events in an implementation- defined manner. In this case, no guarantee is made when this surface will receive keyboard focus (if ever).
For the bottom and background layers, the compositor is allowed to use normal focus semantics.
This setting is mainly intended for applications that need to ensure they receive all keyboard events, such as a lock screen or a password prompt.
OnDemand
request regular keyboard focus semantics
This requests the compositor to allow this surface to be focused and unfocused by the user in an implementation-defined manner. The user should be able to unfocus this surface even regardless of the layer it is on.
Typically, the compositor will want to use its normal mechanism to manage keyboard focus between layer shell surfaces with this setting and regular toplevels on the desktop layer (e.g. click to focus). Nevertheless, it is possible for a compositor to require a special interaction to focus or unfocus layer shell surfaces (e.g. requiring a click even if focus follows the mouse normally, or providing a keybinding to switch focus between layers).
This setting is mainly intended for desktop shell components (e.g. panels) that allow keyboard interaction. Using this option can allow implementing a desktop shell that can be fully usable without the mouse.
Trait Implementations§
source§impl Clone for KeyboardInteractivity
impl Clone for KeyboardInteractivity
source§fn clone(&self) -> KeyboardInteractivity
fn clone(&self) -> KeyboardInteractivity
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KeyboardInteractivity
impl Debug for KeyboardInteractivity
source§impl From<KeyboardInteractivity> for u32
impl From<KeyboardInteractivity> for u32
source§fn from(val: KeyboardInteractivity) -> u32
fn from(val: KeyboardInteractivity) -> u32
source§impl Hash for KeyboardInteractivity
impl Hash for KeyboardInteractivity
source§impl Ord for KeyboardInteractivity
impl Ord for KeyboardInteractivity
source§fn cmp(&self, other: &KeyboardInteractivity) -> Ordering
fn cmp(&self, other: &KeyboardInteractivity) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<KeyboardInteractivity> for KeyboardInteractivity
impl PartialEq<KeyboardInteractivity> for KeyboardInteractivity
source§fn eq(&self, other: &KeyboardInteractivity) -> bool
fn eq(&self, other: &KeyboardInteractivity) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<KeyboardInteractivity> for KeyboardInteractivity
impl PartialOrd<KeyboardInteractivity> for KeyboardInteractivity
source§fn partial_cmp(&self, other: &KeyboardInteractivity) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyboardInteractivity) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<u32> for KeyboardInteractivity
impl TryFrom<u32> for KeyboardInteractivity
impl Copy for KeyboardInteractivity
impl Eq for KeyboardInteractivity
impl StructuralEq for KeyboardInteractivity
impl StructuralPartialEq for KeyboardInteractivity
Auto Trait Implementations§
impl RefUnwindSafe for KeyboardInteractivity
impl Send for KeyboardInteractivity
impl Sync for KeyboardInteractivity
impl Unpin for KeyboardInteractivity
impl UnwindSafe for KeyboardInteractivity
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.