]> git.mdlowis.com Git - proto/labwc.git/commitdiff
scaled-icon-buffer: fix window icons not loaded after Reconfigure
authortokyo4j <hrak1529@gmail.com>
Fri, 6 Jun 2025 19:09:27 +0000 (04:09 +0900)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Fri, 6 Jun 2025 19:47:43 +0000 (21:47 +0200)
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

index 5674c6ddc332420aff885a1c4bd0c8922b947072..f55497300db8366630b6e072dd00284f1ec1ada2 100644 (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);
 }