From 073d8c39c158a0f86079f33e5bd8fbcfaca5844b Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Sat, 7 Jun 2025 04:09:27 +0900 Subject: [PATCH] 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(). --- src/common/scaled-icon-buffer.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/scaled-icon-buffer.c b/src/common/scaled-icon-buffer.c index 5674c6dd..f5549730 100644 --- a/src/common/scaled-icon-buffer.c +++ b/src/common/scaled-icon-buffer.c @@ -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); }