wayland: add prefer_csd attribute
This commit is contained in:
parent
42d256e926
commit
bd6fef1d80
3 changed files with 29 additions and 8 deletions
|
|
@ -98,6 +98,7 @@ pub(crate) struct ApplicationName {
|
|||
pub struct WindowAttributesWayland {
|
||||
pub(crate) name: Option<ApplicationName>,
|
||||
pub(crate) activation_token: Option<ActivationToken>,
|
||||
pub(crate) prefer_csd: bool,
|
||||
}
|
||||
|
||||
impl WindowAttributesWayland {
|
||||
|
|
@ -119,6 +120,18 @@ impl WindowAttributesWayland {
|
|||
self.activation_token = Some(token);
|
||||
self
|
||||
}
|
||||
|
||||
/// Builds the window with a given preference for client-side decorations.
|
||||
///
|
||||
/// When set to `true`, the window will tell the compositor that it prefers
|
||||
/// client-side decorations, even if server-side decorations are available.
|
||||
/// When set to `false` (the default), the window will indicate a preference
|
||||
/// for server-side decorations.
|
||||
#[inline]
|
||||
pub fn with_prefer_csd(mut self, prefer_csd: bool) -> Self {
|
||||
self.prefer_csd = prefer_csd;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl PlatformWindowAttributes for WindowAttributesWayland {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue