From 1a5c536cc96de8ba24773e11856c3de15191fcd0 Mon Sep 17 00:00:00 2001 From: DerThore <101505694+DerThore@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:43:21 +0200 Subject: [PATCH 1/5] Complete attributes --- workbench/libs/gadtools/getvisualinfoa.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/workbench/libs/gadtools/getvisualinfoa.c b/workbench/libs/gadtools/getvisualinfoa.c index d195c922cf1..e1ae0306730 100644 --- a/workbench/libs/gadtools/getvisualinfoa.c +++ b/workbench/libs/gadtools/getvisualinfoa.c @@ -1,5 +1,5 @@ /* - Copyright © 1995-2007, The AROS Development Team. All rights reserved. + Copyright © 1995-2007, The AROS Development Team. All rights reserved. $Id$ Desc: @@ -61,13 +61,18 @@ if (screen == NULL) return NULL; - vi = AllocVec(sizeof(struct VisualInfo), MEMF_ANY); + vi = AllocVec(sizeof(struct VisualInfo), MEMF_ANY|MEMF_CLEAR); if (!vi) return NULL; vi->vi_screen = screen; + vi->vi_screenfont = OpenFont(screen->Font); vi->vi_dri = GetScreenDrawInfo(screen); - + if(vi->vi_dri) + { + vi->vi_textpen = vi->vi_dri->dri_Pens[TEXTPEN]; + vi->vi_backpen = vi->vi_dri->dri_Pens[BACKGROUNDPEN]; + } return vi; AROS_LIBFUNC_EXIT From f4abcf0942aa163930f4996a57a1abf58639bfcf Mon Sep 17 00:00:00 2001 From: DerThore <101505694+DerThore@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:52:32 +0200 Subject: [PATCH 2/5] Complete attributes --- workbench/libs/gadtools/freevisualinfo.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/workbench/libs/gadtools/freevisualinfo.c b/workbench/libs/gadtools/freevisualinfo.c index e8a5dcee31b..09397efe398 100644 --- a/workbench/libs/gadtools/freevisualinfo.c +++ b/workbench/libs/gadtools/freevisualinfo.c @@ -1,5 +1,5 @@ /* - Copyright © 1995-2007, The AROS Development Team. All rights reserved. + Copyright © 1995-2007, The AROS Development Team. All rights reserved. $Id$ Desc: @@ -47,11 +47,22 @@ ***************************************************************************/ { AROS_LIBFUNC_INIT + struct ImageLink *il; + struct ImageLink *nextil; if (vi) { - FreeScreenDrawInfo(((struct VisualInfo *)vi)->vi_screen, ((struct VisualInfo *)vi)->vi_dri); - FreeVec(vi); + il = ((struct VisualInfo *)vi)->vi_images; + while(il) + { + nextil = il->il_Next; + DisposeObject(il->il_Image); + FreeVec(il); + il = nextil; + } + FreeScreenDrawInfo(((struct VisualInfo *)vi)->vi_screen, ((struct VisualInfo *)vi)->vi_dri); + CloseFont(vi->vi_ScreenFont); + FreeVec(vi); } AROS_LIBFUNC_EXIT From 841e1dfdb2a4bb9745782f2873816310492aebc5 Mon Sep 17 00:00:00 2001 From: DerThore <101505694+DerThore@users.noreply.github.com> Date: Tue, 13 Oct 2026 13:30:53 +0200 Subject: [PATCH 3/5] complete Attributes for VisualInfo --- workbench/libs/gadtools/gadtools_intern.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/workbench/libs/gadtools/gadtools_intern.h b/workbench/libs/gadtools/gadtools_intern.h index eb7c2103ecd..8255343c36b 100644 --- a/workbench/libs/gadtools/gadtools_intern.h +++ b/workbench/libs/gadtools/gadtools_intern.h @@ -2,7 +2,7 @@ #define GADTOOLS_INTERN_H /* - Copyright © 1995-2011, The AROS Development Team. All rights reserved. + Copyright © 1995-2011, The AROS Development Team. All rights reserved. $Id$ Desc: Internal definitions for gadtools.library. @@ -300,7 +300,11 @@ struct GT_IntuiMessage struct VisualInfo { struct Screen * vi_screen; + struct TextFont * vi_screenfont; struct DrawInfo * vi_dri; + struct ImageLink * vi_images; + UBYTE vi_textpen; + UBYTE vi_backpen; }; /* dummy gadget created by CreateContext */ From 5ebc2e0d13af7f91bf39d426adec7f5b34cfd70a Mon Sep 17 00:00:00 2001 From: DerThore <101505694+DerThore@users.noreply.github.com> Date: Tue, 13 Oct 2026 13:32:06 +0200 Subject: [PATCH 4/5] Complete Attributes (fixed camelcase) --- workbench/libs/gadtools/freevisualinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbench/libs/gadtools/freevisualinfo.c b/workbench/libs/gadtools/freevisualinfo.c index 09397efe398..3e97bcfddb5 100644 --- a/workbench/libs/gadtools/freevisualinfo.c +++ b/workbench/libs/gadtools/freevisualinfo.c @@ -61,7 +61,7 @@ il = nextil; } FreeScreenDrawInfo(((struct VisualInfo *)vi)->vi_screen, ((struct VisualInfo *)vi)->vi_dri); - CloseFont(vi->vi_ScreenFont); + CloseFont(vi->vi_screenfont); FreeVec(vi); } From 8bf3585af61c1179160838a1b974f9620b326b43 Mon Sep 17 00:00:00 2001 From: DerThore <101505694+DerThore@users.noreply.github.com> Date: Tue, 13 Oct 2026 14:22:47 +0200 Subject: [PATCH 5/5] Added typecast --- workbench/libs/gadtools/freevisualinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbench/libs/gadtools/freevisualinfo.c b/workbench/libs/gadtools/freevisualinfo.c index 3e97bcfddb5..6134b8cf0b1 100644 --- a/workbench/libs/gadtools/freevisualinfo.c +++ b/workbench/libs/gadtools/freevisualinfo.c @@ -61,7 +61,7 @@ il = nextil; } FreeScreenDrawInfo(((struct VisualInfo *)vi)->vi_screen, ((struct VisualInfo *)vi)->vi_dri); - CloseFont(vi->vi_screenfont); + CloseFont(((struct VisualInfo *)vi)->vi_screenfont); FreeVec(vi); }