FvwmButtons won't close on click

If I load the included config file, the brightness menu shows. If I select anything but the red ‘X’, the menu does it’s task and then closes. Pressing the red ‘X’ does it’s task, but never closes.

I don’t understand what I’m doing wrong, both FVWM2 and FVWM3 show this behaviour.

#################
# StartFunction #
#################
	DestroyFunc StartFunction
	AddToFunc   StartFunction
	+ I Module FvwmButtons "MainButtonPanel"
	+ I SetEnv BRIGHT false

###################
# MainButtonPanel #
###################
	DestroyModuleConfig MainButtonPanel: *
	*MainButtonPanel: Geometry 100x82+0+0
	*MainButtonPanel: Colorset 1
	*MainButtonPanel: Frame 0
	*MainButtonPanel: Columns 4
	*MainButtonPanel: Rows 12
	*MainButtonPanel: Font "xft:Sans:Bold:pixelsize=20"
	*MainButtonPanel: (4x1)
	*MainButtonPanel: (4x4)
	*MainButtonPanel: (4x1)
	*MainButtonPanel: (1x5)
	*MainButtonPanel: (1x5)
	*MainButtonPanel: (1x5)
	*MainButtonPanel: (1x5, PressIcon light.x.png, Icon light.png, Action(Mouse 1) Func_BrightnessMenu, ActionOnPress)
	*MainButtonPanel: (4x1)

#########################
# ScreenBrightnessPanel #
#########################
	DestroyModuleConfig ScreenBrightnessPanel: *
	*ScreenBrightnessPanel: Geometry 100x40+0+82
	*ScreenBrightnessPanel: Colorset 1
	*ScreenBrightnessPanel: Frame 1
	*ScreenBrightnessPanel: Columns 6
	*ScreenBrightnessPanel: Rows 2
	*ScreenBrightnessPanel: Font "xft:Sans:Bold:pixelsize=10"
	*ScreenBrightnessPanel:(1x1, Title '0', Action(Mouse 1) Func_ScreenBrightness 0)
	*ScreenBrightnessPanel:(1x1, Title '1', Action(Mouse 1) Func_ScreenBrightness 1)
	*ScreenBrightnessPanel:(1x1, Title '2', Action(Mouse 1) Func_ScreenBrightness 2)
	*ScreenBrightnessPanel:(1x1, Title '3', Action(Mouse 1) Func_ScreenBrightness 3)
	*ScreenBrightnessPanel:(1x1, Title '4', Action(Mouse 1) Func_ScreenBrightness 4)
	*ScreenBrightnessPanel:(1x1, Colorset 11, Title 'X', Action(Mouse 1) Func_BlackScreen)
	*ScreenBrightnessPanel:(1x1, Title '5', Action(Mouse 1) Func_ScreenBrightness 5)
	*ScreenBrightnessPanel:(1x1, Title '6', Action(Mouse 1) Func_ScreenBrightness 6)
	*ScreenBrightnessPanel:(1x1, Title '7', Action(Mouse 1) Func_ScreenBrightness 7)
	*ScreenBrightnessPanel:(1x1, Title '8', Action(Mouse 1) Func_ScreenBrightness 8)
	*ScreenBrightnessPanel:(1x1, Title '9', Action(Mouse 1) Func_ScreenBrightness 9)
	*ScreenBrightnessPanel:(1x1, Colorset 10, Title 'O', Action(Mouse 1) Func_ScreenBrightness 10)

#################
# Set Variables #
#################
	ImagePath $[FVWM_USERDIR]/icons

#############
# Colorsets #
#############
	Colorset 1  fg white, bg black, Plain, NoShape
	Colorset 2  fg white, bg rgb:49/72/50, Plain, NoShape

	Colorset 10 fg green, bg black, hi, sh, Plain, NoShape
	Colorset 11 fg red, bg black, hi, sh, Plain, NoShape
	
####################
# Func_BlackScreen #
####################
	DestroyFunc Func_BlackScreen
	AddToFunc Func_BlackScreen
#	+ I Exec exec sleep 2; xset dpms force off
	+ I Exec sleep 2; xset dpms force off

#######################
# Func_BrightnessMenu #
#######################
	DestroyFunc Func_BrightnessMenu
	AddToFunc Func_BrightnessMenu
	+ I Test (EnvMatch BRIGHT false) Module FvwmButtons ScreenBrightnessPanel
	+ I Test (EnvMatch BRIGHT false) UnsetEnv CHANGE
	+ I Test (EnvMatch BRIGHT true) KillModule FvwmButtons ScreenBrightnessPanel
	+ I Test (EnvMatch BRIGHT true) SetEnv CHANGE true
	+ I Func_ChangeBright

######################
# Func_ChangeBright  #
######################
	DestroyFunc Func_ChangeBright
	AddToFunc Func_ChangeBright
	+ I Test (!EnvIsSet CHANGE) SetEnv BRIGHT true
	+ I Test (EnvIsSet CHANGE) SetEnv BRIGHT false
	+ I UnsetEnv CHANGE

#########################
# Func_ScreenBrightness #
#########################
	DestroyFunc Func_ScreenBrightness
	AddToFunc Func_ScreenBrightness
	+ I Exec exec echo $0 | sudo tee /sys/class/backlight/acpi_video0/brightness
	+ I KillModule FvwmButtons ScreenBrightnessPanel
	+ I SetEnv BRIGHT false

################
# Global Style #
################
	Style * \
		BorderWidth 3, \
		Colorset 1, \
		DecorateTransient, \
		!FPGrabFocusTransient, \
		FPReleaseFocusTransient, \
		GrabFocusOff, \
		HandleWidth 3, \
		HilightColorset 2, \
		!Icon, \
		MouseFocusClickRaises, \
		ResizeOpaque, \
		SnapAttraction 5 SameType ScreenAll, \
		SnapGrid, \
		SloppyFocus, \
		!UsePPosition, \

###################
# MainButtonPanel #
###################
	Style MainButtonPanel \
		!Borders, \
		CirculateSkip, \
		FixedPosition, \
		FixedSize, \
		!Handles, \
		!Iconifiable, \
		Layer 0 5, \
		StaysPut, \
		Sticky, \
		!Title, \
		WindowListSkip

#########################
# ScreenBrightnessPanel #
#########################
	Style ScreenBrightnessPanel \
		!Borders, \
		!Handles, \
		Layer 0 5, \
		PositionPlacement +0 -25p, \
		StaysPut, \
		!Title, \
		WindowListSkip

Though I still don’t know why it won’t close on it’s own, adding the following to Func_BlackScreen solved my problem.

    + I KillModule FvwmButtons ScreenBrightnessPanel