refactor: make SurfaceMessage handling opt in

This commit is contained in:
Ashley Wulber 2025-02-24 14:35:17 -05:00
parent 63f249a395
commit 31d676a4f2
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
4 changed files with 16 additions and 7 deletions

View file

@ -388,7 +388,7 @@ impl Core {
id
}
#[cfg(feature = "wayland")]
#[cfg(feature = "surface-message")]
/// # Panics
///
/// Will panic if the menu bar collapses without tracking the size

View file

@ -7,6 +7,13 @@ pub enum MessageWrapper<M> {
Message(M),
}
#[cfg(not(feature = "surface-message"))]
impl<M> From<M> for MessageWrapper<M> {
fn from(value: M) -> Self {
MessageWrapper::Message(value)
}
}
/// Ignore this message in your application. It will be intercepted.
#[derive(Clone)]
pub enum SurfaceMessage {