diff --git a/src/window.c b/src/window.c index 2149bef..4c1a559 100644 --- a/src/window.c +++ b/src/window.c @@ -750,8 +750,8 @@ WWindow *wManageWindow(WScreen *scr, WNativeWindow window) wwin->main_window = wwin->client_win; /* Wayland native clients have no client_leader or window_group. - * If a matching docked icon exists, group by app_id (wm_class) so - * all instances share one appicon. Otherwise each gets its own. */ + * Group by app_id (wm_class): all windows with the same app_id share + * one WApplication and one appicon. */ if (wwin->main_window == WM_NATIVE_NONE && wwin->transient_for == WM_NATIVE_NONE && wwin->client_leader == WM_NATIVE_NONE @@ -762,10 +762,7 @@ WWindow *wManageWindow(WScreen *scr, WNativeWindow window) for (tmp = scr->focused_window; tmp; tmp = tmp->next) { if (tmp != wwin && tmp->wm_class && strcmp(tmp->wm_class, wwin->wm_class) == 0 - && tmp->main_window != WM_NATIVE_NONE - && wApplicationOf(tmp->main_window) - && wApplicationOf(tmp->main_window)->app_icon - && wApplicationOf(tmp->main_window)->app_icon->docked) { + && tmp->main_window != WM_NATIVE_NONE) { wwin->main_window = tmp->main_window; break; }