Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WmCapabilitieSet -> WmCapabilitySet #1208

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/wayland/shell/xdg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ pub struct ToplevelState {
pub decoration_mode: Option<zxdg_toplevel_decoration_v1::Mode>,

/// The wm capabilities for this toplevel
pub capabilities: WmCapabilitieSet,
pub capabilities: WmCapabilitySet,
}

impl Clone for ToplevelState {
Expand Down Expand Up @@ -771,11 +771,11 @@ impl From<ToplevelStateSet> for Vec<xdg_toplevel::State> {

/// Container holding the [`xdg_toplevel::WmCapabilities`] for a toplevel
#[derive(Debug, Default, PartialEq, Eq, Clone)]
pub struct WmCapabilitieSet {
pub struct WmCapabilitySet {
capabilities: HashSet<xdg_toplevel::WmCapabilities>,
}

impl WmCapabilitieSet {
impl WmCapabilitySet {
/// Returns `true` if the set contains a capability.
pub fn contains(&self, capability: xdg_toplevel::WmCapabilities) -> bool {
self.capabilities.contains(&capability)
Expand Down Expand Up @@ -808,7 +808,7 @@ impl WmCapabilitieSet {
}
}

impl<T> From<T> for WmCapabilitieSet
impl<T> From<T> for WmCapabilitySet
where
T: IntoIterator<Item = xdg_toplevel::WmCapabilities>,
{
Expand Down Expand Up @@ -971,7 +971,7 @@ pub trait XdgShellHandler {
pub struct XdgShellState {
known_toplevels: Vec<ToplevelSurface>,
known_popups: Vec<PopupSurface>,
default_capabilities: WmCapabilitieSet,
default_capabilities: WmCapabilitySet,
global: GlobalId,
}

Expand All @@ -995,7 +995,7 @@ impl XdgShellState {
/// Create a new `xdg_shell` global with a specific set of [`WmCapabilities`](xdg_toplevel::WmCapabilities)
pub fn new_with_capabilities<D>(
display: &DisplayHandle,
capabilities: impl Into<WmCapabilitieSet>,
capabilities: impl Into<WmCapabilitySet>,
) -> XdgShellState
where
D: GlobalDispatch<XdgWmBase, ()> + 'static,
Expand All @@ -1015,7 +1015,7 @@ impl XdgShellState {
/// *Note*: This does not update the capabilities on existing toplevels, only new
/// toplevels are affected. To update existing toplevels iterate over them,
/// update their capabilities and send a configure.
pub fn replace_capabilities(&mut self, capabilities: impl Into<WmCapabilitieSet>) {
pub fn replace_capabilities(&mut self, capabilities: impl Into<WmCapabilitySet>) {
self.default_capabilities = capabilities.into();
}

Expand Down
Loading