[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Redraw bug in current trunk



Jo Even Skarstein wrote:

> On 09/15/2010 08:04 PM, Helmut Karlowski wrote:
>
> > Just took another look:
> >
> > All XaAES does is send WM_ARROWED, WA_UP/DNLINE to qed. Everything else is done by qed.
> >
> > BTW: Suddenly I get the same redraw-errors on aranym too.
>
> Yes, because there is a bug in XaAES ;-) XaAES doesn't just send

Just found this (in win_draw.c):

static void _cdecl
s_info_size(struct xa_window *wind, struct xa_widget *widg)
{
  struct xa_wcol_inf *wci = &((struct window_colours *)wind->ontop_cols)->info;
  struct xa_wtxt_inf *wti = &((struct window_colours *)wind->ontop_cols)->info_txt;
  struct xa_wtxt_inf *wtu = &((struct window_colours *)wind->untop_cols)->info_txt;
  struct xa_vdi_settings *v = wind->vdi_settings;
  short w, h;

  widg->r.w = widg_w;

  if (!wti->n.f)
  {
    (*v->api->t_font)(v, wti->n.p, 1); // 103);
//    if (v->font_rid != v->font_sid)
//      (*v->api->t_font)(v, wti->n.p, 13384);
    if (v->font_rid != v->font_sid)
      (*v->api->t_font)(v, wti->n.p, 1);
    wti->n.f = wti->s.f = wti->h.f = wtu->n.f = wtu->s.f = wtu->h.f = v->font_sid;
  }

//    wti->n.f = wti->s.f = wti->h.f = wtu->n.f = wtu->s.f = wtu->h.f = v->font_sid;
  (*v->api->t_font)(v, wti->n.p, wti->n.f);
  (*v->api->t_effects)(v, wti->n.e);
  (*v->api->text_extent)(v, "X", &wti->n, &w, &h);
  BLOG((0,"s_info_size(1):h=%d flags=%x", h, wci->flags));
  (*v->api->t_effects)(v, 0);
  //(*v->api->t_extent)(v, "A", &w, &h);
//  h += 2;
  if ((wci->flags & (WCOL_DRAW3D|WCOL_BOXED)) || (wti->flags & WTXT_DRAW3D))
    h += 4;
  if ((wci->flags & WCOL_ACT3D) || (wti->flags & WTXT_ACT3D))
    h++;
//  if ((wci->flags & WCOL_BOXED))
//    h += 2;

  BLOG((0,"s_info_size:h=%d flags=%x", h, wci->flags));
  widg->r.h = 18;//h;
}


The //-chaos is not from me ;-)

But the fixed 18 also fixes the redraw-error, will have to see what this code actually wants.

-Helmut