lib/rabbit/renderer/display/base.rb in rabbit-0.9.1 vs lib/rabbit/renderer/display/base.rb in rabbit-0.9.2

- old
+ new

@@ -1,12 +1,14 @@ require "rabbit/renderer/base" +require "rabbit/renderer/display/hook-handler" module Rabbit module Renderer module Display module Base include Renderer::Base + include HookHandler def initialize(*args, &block) @drawable = nil super end @@ -27,17 +29,24 @@ def redraw widget.queue_draw end - def attach_to(window) + def attach_to(window, container=nil) @window = window + @container = container || @window set_configure_event end def detach + if !@window.destroyed? and @configure_signal_id + @window.signal_handler_disconnect(@configure_signal_id) + @configure_signal_id = nil + end + @window = nil + @container = nil end def toggle_whiteout super update_menu