Skip to content

Commit

Permalink
Fix for Tk under Ruby 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
mooffie committed Apr 18, 2010
1 parent 4cfa296 commit 51a42d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/drx/tk/app.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@

# The following forces Ruby 1.9 to run Tk.mainloop in the main thread. Or
# else DrX::TkGUI::Appliation#run won't work correctly: after calling it
# twice, Tk.mainloop won't return, as it (apparently) won't detect the root
# window has been destroyed.
module TkCore; RUN_EVENTLOOP_ON_MAIN_THREAD = true; end

require 'tk'
require 'drx/tk/imagemap'

Expand Down

0 comments on commit 51a42d4

Please sign in to comment.