From 0ab012346c9fa0ca3fa4468dccb130bc3dfa45f4 Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Sun, 18 May 2025 12:46:04 -0600 Subject: [PATCH] Fix crash in FvwmPager and clarify Balloons option. FvwmPager would crash if `WindowFont` was set then later set to `None`. This makes sure that if `WindowFont None` is used, the font is set back to Null for fallback checks. This also clarifies the `Balloon type` option. This option no longer accepts NULL inputs, use All as an example to show balloon windows everywhere, and state default is None. --- doc/FvwmPager.adoc | 9 +++++---- modules/FvwmPager/init_pager.c | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/FvwmPager.adoc b/doc/FvwmPager.adoc index afef7d8bd..7ea2e9b32 100644 --- a/doc/FvwmPager.adoc +++ b/doc/FvwmPager.adoc @@ -297,13 +297,14 @@ Balloon windows provide popup labels for each window when the mouse hovers over it. The label, font, color, and position of these balloon windows can be configured below. -*FvwmPager: Balloons [type]:: +*FvwmPager: Balloons type:: Show a balloon describing the window when the pointer is moved into a window in the pager. The default format (the window's icon name) can be changed using _BalloonStringFormat_. If _type_ is "Pager" balloons - are just shown for an un-iconified pager; if _type_ is "Icon" balloons - are just shown for an iconified pager. If _type_ is anything else (or - null) balloons are always shown. + are just shown for an un-iconified pager. If _type_ is "Icon" balloons + are just shown for an iconified pager. If _type_ is "All" (or any unused + non blank value) balloons are always shown. If _type_ is "None" balloons + are never shown (the default behavior). *FvwmPager: BalloonFont font-name:: Specifies a font to use for the balloon text. Defaults to _fixed_. diff --git a/modules/FvwmPager/init_pager.c b/modules/FvwmPager/init_pager.c index 0c863061a..ae99765d8 100644 --- a/modules/FvwmPager/init_pager.c +++ b/modules/FvwmPager/init_pager.c @@ -1187,6 +1187,7 @@ void parse_options(void) StrEquals(resource, "SmallFont")) { FlocaleUnloadFont(dpy, Scr.winFfont); + Scr.winFfont = NULL; if (strncasecmp(next, "none", 4) != 0) Scr.winFfont = FlocaleLoadFont( dpy, next, MyName);