Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/window.c:
struct wayland_client_surface *client; struct wayland_win_data *data, *toplevel_data; BOOL managed;
ICONINFO ii, ii_small;
HICON icon_small, icon_big;
TRACE("hwnd %p new_rects %s after %p flags %08x\n", hwnd, debugstr_window_rects(new_rects), insert_after, swp_flags);
icon_big = get_window_icon(hwnd, ICON_BIG, 0, &ii);
Getting the window icons involves some non-trivial overhead (sending messages etc), so let's not do it unconditionally on every WindowPosChanged. One idea is adding the following in the end of the function:
``` ... needs_icon = data->wayland_surface && data->wayland_surface->role == WAYLAND_SURFACE_ROLE_TOPLEVEL && data->wayland_surface->xdg_toplevel && !data->wayland_surface->big_icon_buffer;
wayland_win_data_release(data);
if (needs_icon) { ... get icon info ... ... get win_data again and set icons ... } ```