From 9bd01cfe92153addefbaea9e47fd26629c0cebcc Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 25 Sep 2024 22:30:04 +0900 Subject: [PATCH] screen: add support for container --- lib/rabbit/renderer/screen.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/rabbit/renderer/screen.rb b/lib/rabbit/renderer/screen.rb index cb778f02..1c7635b2 100644 --- a/lib/rabbit/renderer/screen.rb +++ b/lib/rabbit/renderer/screen.rb @@ -79,7 +79,11 @@ def initialize(canvas) def attach_to(window, container=nil) super - @window.add(@fixed) + if container + container.add(@fixed) + else + @window.child = @fixed + end @fixed.show attach_key(@window) end