From ce8783c0d48bbc3c76e9d594a987d80b22de6870 Mon Sep 17 00:00:00 2001 From: Window Maker Date: Sat, 23 May 2026 12:56:43 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20X11=20backend=20rendering=20=E2=80=94=20?= =?UTF-8?q?frame=20paint=20pipeline=20and=20icon=20recursion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - x11_frame_paint_impl: delegate to wFrameWindowPaint() which handles texture remake, background setup, bevel drawing, and title/button paint. The old implementation only drew title text and resizebar lines, missing all background/texture setup. - x11_icon_paint: add recursion guard. wIconPaint() calls icon_paint() which called wIconPaint() again — infinite recursion causing stack overflow crash on first dock/clip icon paint (blank desktop). - Remove debug wwarning lines from wevent_x11.c and menu.c. --- WINGs/wevent_x11.c | 4 ---- src/backend/x11/x11_backend.c | 6 ++++++ src/menu.c | 3 --- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/WINGs/wevent_x11.c b/WINGs/wevent_x11.c index 7666bfc..8996de9 100644 --- a/WINGs/wevent_x11.c +++ b/WINGs/wevent_x11.c @@ -257,10 +257,6 @@ x11_fetch(void *ectx, WMEvent *ev) xev_to_wme(slot, ev); ev->_view_target = W_GetViewForXWindow(ctx->dpy, slot->xany.window); - if (slot->type == Expose && ev->_view_target) - wwarning("FETCH: expose for 0x%lx -> view %p", slot->xany.window, ev->_view_target); - if (slot->type == Expose && !ev->_view_target) - wwarning("FETCH: expose for 0x%lx -> NO VIEW", slot->xany.window); } static Bool diff --git a/src/backend/x11/x11_backend.c b/src/backend/x11/x11_backend.c index 02fd2cc..665d3ba 100644 --- a/src/backend/x11/x11_backend.c +++ b/src/backend/x11/x11_backend.c @@ -2779,6 +2779,7 @@ x11_frame_paint_impl(struct WFrameWindow *fwin) return 1; } + static void x11_frame_paint_button(WCoreWindow *button, WTexture *texture, unsigned long color, WPixmap *image, int pushed); @@ -3678,7 +3679,12 @@ static void x11_icon_update_pixmap(WIcon *icon) static void x11_icon_paint(WIcon *icon) { + static int in_paint = 0; + if (in_paint) + return; + in_paint = 1; wIconPaint(icon); + in_paint = 0; } /* -------------------------------------------------------------------- */ diff --git a/src/menu.c b/src/menu.c index 8309715..f40ac8a 100644 --- a/src/menu.c +++ b/src/menu.c @@ -199,14 +199,11 @@ WMenu *wMenuCreate(WScreen *screen, const char *title, int main_menu) menu->menu_texture_data = None; - wwarning("menu: wMenuCreate XMapWindow win=0x%lx", (unsigned long)menu->menu->window); if (menu->menu->window) wm_backend->window_map((WNativeWindow)menu->menu->window); - wwarning("menu: wMenuCreate XMapWindow done"); if (menu->menu->window) wm_backend->event_flush(); - wwarning("menu: wMenuCreate XFlush done"); if (!brother) { brother = 1;