Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest.toml
.CondaPkg
15 changes: 9 additions & 6 deletions src/pygui.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,15 @@ function Tk_eventloop(sec::Real=50e-3)
flag = _tkinter.ALL_EVENTS | _tkinter.DONT_WAIT
root = pynothing = Py(nothing)
install_doevent(sec) do async
new_root = Tk._default_root
if pyconvert(Bool, new_root != pynothing)
root = new_root
end
if pyconvert(Bool, root != pynothing)
while pyconvert(Bool, root.dooneevent(flag))
@show typeof(Tk)
if pyhasattr(Tk, "_default_root")
new_root = Tk._default_root
if pyconvert(Bool, new_root != pynothing)
root = new_root
end
if pyconvert(Bool, root != pynothing)
while pyconvert(Bool, root.dooneevent(flag))
end
end
end
end
Expand Down