scaled-icon-buffer: fix window icons not loaded after Reconfigure

This patch fixes the issue that window icons become the fallback
one after Reconfigure, by setting scaled_icon_buffer->view_app_id (and
other properties) in scaled_icon_buffer_set_view().

The reason why the window icons were displayed before Reconfigure is that
applications usually enable decorations and then set app_id which fires
handle_view_set_icon().
This commit is contained in:
tokyo4j 2025-06-07 04:09:27 +09:00 committed by Consolatis
parent fb077c0095
commit 073d8c39c1

View file

@ -224,13 +224,12 @@ scaled_icon_buffer_set_view(struct scaled_icon_buffer *self, struct view *view)
wl_list_remove(&self->on_view.destroy.link);
}
self->view = view;
if (view) {
self->on_view.set_icon.notify = handle_view_set_icon;
wl_signal_add(&view->events.set_icon, &self->on_view.set_icon);
self->on_view.destroy.notify = handle_view_destroy;
wl_signal_add(&view->events.destroy, &self->on_view.destroy);
}
self->on_view.set_icon.notify = handle_view_set_icon;
wl_signal_add(&view->events.set_icon, &self->on_view.set_icon);
self->on_view.destroy.notify = handle_view_destroy;
wl_signal_add(&view->events.destroy, &self->on_view.destroy);
handle_view_set_icon(&self->on_view.set_icon, NULL);
scaled_scene_buffer_request_update(self->scaled_buffer, self->width, self->height);
}