about summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ui/ui.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ui/ui.go b/lib/ui/ui.go
index 9a9ed14..ee71f8e 100644
--- a/lib/ui/ui.go
+++ b/lib/ui/ui.go
@@ -17,7 +17,7 @@ type UI struct {
 	invalid  int32 // access via atomic
 }
 
-func Initialize(content DrawableInteractiveBeeper) (*UI, error) {
+func Initialize(content DrawableInteractive) (*UI, error) {
 
 	screen, err := tcell.NewScreen()
 	if err != nil {
@@ -52,7 +52,9 @@ func Initialize(content DrawableInteractiveBeeper) (*UI, error) {
 	content.OnInvalidate(func(_ Drawable) {
 		atomic.StoreInt32(&state.invalid, 1)
 	})
-	content.OnBeep(screen.Beep)
+	if beeper, ok := content.(DrawableInteractiveBeeper); ok {
+		beeper.OnBeep(screen.Beep)
+	}
 	content.Focus(true)
 
 	if root, ok := content.(RootDrawable); ok {
14'>114 115 116 117 118 119