diff --git a/doc/modules/FvwmPager.adoc b/doc/modules/FvwmPager.adoc index c355f585e..f81090514 100644 --- a/doc/modules/FvwmPager.adoc +++ b/doc/modules/FvwmPager.adoc @@ -339,10 +339,14 @@ done about this - except not using SloppyFocus in the pager. Uses colorsets in the same way as *FvwmPager: WindowColors. The shadow and hilight colors of the colorset are only used for the window borders if the *FvwmPager: Window3DBorders is specified too. +*FvwmPager: WindowMinSize n:: + Specifies the minimum size as _n_ pixels of the mini windows. This does + not include the width of the border, so the actual minimum size is + 2 * _WindowBorderWidth_ + _WindowMinSize_. The default is 3. *FvwmPager: WindowBorderWidth n:: Specifies the width of the border drawn around the mini windows. This - also sets the minimum size of the mini windows to (2 * _n_ + 1). The - default is 1. + also affects the minimum size of the mini windows, which will be + 2 * _WindowBorderWidth_ + _WindowMinSize_. The default is 1. *FvwmPager: Window3DBorders:: Specifies that the mini windows should have a 3d borders based on the mini window background. This option only works if *FvwmPager: diff --git a/libs/defaults.h b/libs/defaults.h index c1b28c040..e049f9073 100644 --- a/libs/defaults.h +++ b/libs/defaults.h @@ -106,10 +106,6 @@ #define DEFAULT_CURSOR_FORE_COLOR "black" #define DEFAULT_CURSOR_BACK_COLOR "white" -/*** pager ***/ -#define DEFAULT_MOVE_THRESHOLD 3 /* pixels */ -#define DEFAULT_PAGER_WINDOW_BORDER_WIDTH 1 /* pixels */ - /*** fonts ***/ #define EXTRA_TITLE_FONT_HEIGHT 3 /* pixels */ #define EXTRA_TITLE_FONT_WIDTH 3 /* pixels */ diff --git a/modules/FvwmPager/FvwmPager.c b/modules/FvwmPager/FvwmPager.c index a39dd3932..75f9e9f73 100644 --- a/modules/FvwmPager/FvwmPager.c +++ b/modules/FvwmPager/FvwmPager.c @@ -87,7 +87,8 @@ char *WindowHiFore = NULL; char *WindowLabelFormat = NULL; unsigned int WindowBorderWidth = DEFAULT_PAGER_WINDOW_BORDER_WIDTH; -unsigned int MinSize = 2 * DEFAULT_PAGER_WINDOW_BORDER_WIDTH + 5; +unsigned int MinSize = (2 * DEFAULT_PAGER_WINDOW_BORDER_WIDTH + + DEFAULT_PAGER_WINDOW_MIN_SIZE); Bool WindowBorders3d = False; Bool UseSkipList = False; @@ -96,7 +97,6 @@ FvwmPicture *PixmapBack = NULL; char *ImagePath = NULL; -#define DEFAULT_PAGER_MOVE_THRESHOLD 3 int MoveThreshold = DEFAULT_PAGER_MOVE_THRESHOLD; int ShowBalloons = 0, ShowPagerBalloons = 0, ShowIconBalloons = 0; @@ -2291,8 +2291,20 @@ void ParseOptions(void) } else if (StrEquals(resource, "WindowBorderWidth")) { + MinSize = MinSize - 2*WindowBorderWidth; sscanf(arg1, "%d", &WindowBorderWidth); - MinSize = 2 * WindowBorderWidth + 5; + if (WindowBorderWidth > 0) + MinSize = 2 * WindowBorderWidth + MinSize; + else + MinSize = 2 * DEFAULT_PAGER_WINDOW_BORDER_WIDTH + MinSize; + } + else if (StrEquals(resource, "WindowMinSize")) + { + sscanf(arg1, "%d", &MinSize); + if (MinSize > 0) + MinSize = 2 * WindowBorderWidth + MinSize; + else + MinSize = 2 * WindowBorderWidth + DEFAULT_PAGER_WINDOW_MIN_SIZE; } else if (StrEquals(resource, "Window3dBorders")) { diff --git a/modules/FvwmPager/FvwmPager.h b/modules/FvwmPager/FvwmPager.h index e94f78e73..b360fb3c5 100644 --- a/modules/FvwmPager/FvwmPager.h +++ b/modules/FvwmPager/FvwmPager.h @@ -8,6 +8,10 @@ #include "libs/Flocale.h" #include "libs/Module.h" +#define DEFAULT_PAGER_WINDOW_BORDER_WIDTH 1 +#define DEFAULT_PAGER_WINDOW_MIN_SIZE 3 +#define DEFAULT_PAGER_MOVE_THRESHOLD 3 + struct fpmonitor { char *name; int is_primary, output;