wayland: fix close button for internal window panels

The close button on internal windows (dock app settings, etc.) did
nothing because:

1. wwin->protocols.DELETE_WINDOW was never set for internal windows,
   so windowCloseClick skipped the wClientSendProtocol call.

2. Even if it were called, wl_client_send_protocol just called
   client_close which looks for an XDG/XWayland surface. Internal
   windows have synthetic WINGs view IDs, not real surfaces.

Fix: set DELETE_WINDOW protocol flag in wManageInternalWindow, and
handle internal windows in wl_client_send_protocol by calling
wUnmanageWindow directly.
This commit is contained in:
lkn 2026-06-24 22:25:11 +02:00
parent 62f8cb5c77
commit ab933c6565
2 changed files with 5 additions and 0 deletions

View File

@ -585,6 +585,10 @@ void wl_client_send_protocol(WWindow *wwin, unsigned long protocol,
unsigned long timestamp)
{
(void)protocol; (void)timestamp;
if (wwin->flags.internal_window) {
wUnmanageWindow(wwin, False, False);
return;
}
wm_backend->client_close(wwin->client_win);
}

View File

@ -1425,6 +1425,7 @@ WWindow *wManageInternalWindow(WScreen *scr, WNativeWindow window, WNativeWindow
wwin->frame->on_mousedown_titlebar = titlebarMouseDown;
wwin->frame->on_dblclick_titlebar = titlebarDblClick;
wwin->frame->on_mousedown_resizebar = resizebarMouseDown;
wwin->protocols.DELETE_WINDOW = 1;
wwin->client.y += wwin->frame->top_width;
wm_backend->client_reparent(wwin->client_win, wwin->frame->core->window,