This commit is contained in:
Jeremy Soller 2025-03-19 14:35:09 -06:00 • committed by Ashley Wulber
parent 4db71cb0e6
commit 7120db60ba
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -528,9 +528,11 @@ impl SctkState {
let mut common = subsurface.common.lock().unwrap(); let mut common = subsurface.common.lock().unwrap();
common.fractional_scale = Some(scale_factor); common.fractional_scale = Some(scale_factor);
if legacy { if legacy {
subsurface.instance.wl_surface.set_buffer_scale(scale_factor as _); subsurface
.instance
.wl_surface
.set_buffer_scale(scale_factor as _);
} }
} }
if let Some(popup) = self if let Some(popup) = self
@ -1009,14 +1011,14 @@ impl SctkState {
platform_specific::wayland::layer_surface::Action::Destroy(id) => { platform_specific::wayland::layer_surface::Action::Destroy(id) => {
if let Some(i) = self.layer_surfaces.iter().position(|l| l.id == id) { if let Some(i) = self.layer_surfaces.iter().position(|l| l.id == id) {
let l = self.layer_surfaces.remove(i); let l = self.layer_surfaces.remove(i);
let (removed, remaining): (Vec<_>, Vec<_>) = self let (removed, remaining): (Vec<_>, Vec<_>) = self
.subsurfaces .subsurfaces
.drain(..) .drain(..)
.partition(|s| { .partition(|s| {
s.instance.parent == l.surface.wl_surface().id() s.instance.parent == l.surface.wl_surface().id()
}); });
self.subsurfaces = remaining; self.subsurfaces = remaining;
for s in removed for s in removed
{ {
@ -1237,18 +1239,17 @@ impl SctkState {
if let Some(id) = self.id_map.remove(&popup.popup.wl_surface().id()) { if let Some(id) = self.id_map.remove(&popup.popup.wl_surface().id()) {
_ = self.destroyed.insert(id); _ = self.destroyed.insert(id);
} }
let (removed, remaining): (Vec<_>, Vec<_>) = self let (removed, remaining): (Vec<_>, Vec<_>) = self
.subsurfaces .subsurfaces
.drain(..) .drain(..)
.partition(|s| { .partition(|s| {
s.instance.parent == popup.popup.wl_surface().id() s.instance.parent == popup.popup.wl_surface().id()
}); });
self.subsurfaces = remaining; self.subsurfaces = remaining;
for s in removed for s in removed
{ {
crate::subsurface_widget::remove_iced_subsurface( crate::subsurface_widget::remove_iced_subsurface(
&s.instance.wl_surface, &s.instance.wl_surface,
); );
@ -1366,11 +1367,10 @@ impl SctkState {
.partition(|s| { .partition(|s| {
s.instance.parent == surface.session_lock_surface.wl_surface().id() s.instance.parent == surface.session_lock_surface.wl_surface().id()
}); });
self.subsurfaces = remaining; self.subsurfaces = remaining;
for s in removed for s in removed
{ {
crate::subsurface_widget::remove_iced_subsurface( crate::subsurface_widget::remove_iced_subsurface(
&s.instance.wl_surface, &s.instance.wl_surface,
); );
@ -1579,10 +1579,10 @@ impl SctkState {
&self.queue_handle, &self.queue_handle,
cctk::sctk::globals::GlobalData, cctk::sctk::globals::GlobalData,
); );
let wp_fractional_scale = let wp_fractional_scale = self
self.fractional_scaling_manager.as_ref().map(|fsm| { .fractional_scaling_manager
fsm.fractional_scaling(&wl_surface, &self.queue_handle) .as_ref()
}); .map(|fsm| fsm.fractional_scaling(&wl_surface, &self.queue_handle));
let wp_alpha_modifier_surface = subsurface_state let wp_alpha_modifier_surface = subsurface_state
.wp_alpha_modifier .wp_alpha_modifier