summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-16 10:39:21 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-16 10:39:21 +0000
commitd5db6fd46ef39538766493e1221ca070cff26148 (patch)
treee35bec6817292342a5741d5558faf39d13b35aac /lib
parentddd90c76e150f88ffb1a64f591dcefee8afa1f56 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/tk.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/tk.rb b/lib/tk.rb
index b932696..b102741 100644
--- a/lib/tk.rb
+++ b/lib/tk.rb
@@ -268,6 +268,13 @@ module TkCore
end
def mainloop
+ if defined?(Thread)
+ INTERP._eval("proc rb_after {} {
+ ruby {Thread.pass};
+ after 200 rb_after
+ }")
+ INTERP._eval("rb_after")
+ end
TclTkLib.mainloop
end
@@ -317,10 +324,6 @@ module Tk
tk_call 'bell'
end
- def mainloop
- TclTkLib.mainloop
- end
-
module Scrollable
def xscrollcommand(cmd=Proc.new)
configure_cmd 'xscrollcommand', cmd