fix: X11 backend rendering — frame paint pipeline and icon recursion
- 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.
This commit is contained in:
parent
a519435bfa
commit
ce8783c0d4
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue