fix: don't print unapplicable warnings when a popup surface has its viewport set.
This commit is contained in:
parent
03368548ba
commit
da6693c88a
1 changed files with 17 additions and 6 deletions
|
|
@ -392,12 +392,23 @@ pub(super) fn update_surface_viewport(
|
||||||
}
|
}
|
||||||
debug!("{} viewport: {width}x{height}", surface.id());
|
debug!("{} viewport: {width}x{height}", surface.id());
|
||||||
if let Some(hints) = size_hints {
|
if let Some(hints) = size_hints {
|
||||||
let Some(SurfaceRole::Toplevel(Some(data))) = &role else {
|
let data = match &role {
|
||||||
|
Some(SurfaceRole::Toplevel(Some(data))) => data,
|
||||||
|
Some(SurfaceRole::Toplevel(None)) => {
|
||||||
warn!(
|
warn!(
|
||||||
"Trying to update size hints on {}, but toplevel role data is missing",
|
"Trying to update size hints on {}, but toplevel role data is missing",
|
||||||
surface.id()
|
surface.id()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
Some(SurfaceRole::Popup(_)) => {
|
||||||
|
// Popups don't have min/max size hints.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
None => {
|
||||||
|
warn!("No role set on {}.", surface.id());
|
||||||
|
return;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(min) = hints.min_size {
|
if let Some(min) = hints.min_size {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue