X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=gtk%2Fgtk.main_loop_events.lisp;h=5fbc15fbe3959235440078524628fc92000f14fc;hb=307892d397e11717a9a1b627d9b9914dbc1f1fac;hp=d2bdb9c23683f1707d19b4b90e61ec8db996450f;hpb=246031be275ccb404e6344461f516a874ba88341;p=cl-gtk2.git diff --git a/gtk/gtk.main_loop_events.lisp b/gtk/gtk.main_loop_events.lisp index d2bdb9c..5fbc15f 100644 --- a/gtk/gtk.main_loop_events.lisp +++ b/gtk/gtk.main_loop_events.lisp @@ -19,10 +19,6 @@ (gtk-init) -(defcfun gtk-test-register-all-types :void) - -(gtk-test-register-all-types) - (defcfun gtk-events-pending :boolean) (defcfun gtk-main :void) @@ -32,6 +28,8 @@ #+thread-support (defun ensure-gtk-main () + (when (and *main-thread* (not (bt:thread-alive-p *main-thread*))) + (setf *main-thread* nil)) (unless *main-thread* (setf *main-thread* (bt:make-thread (lambda () (gtk:gtk-main)) :name "cl-gtk2 main thread")))) @@ -40,6 +38,9 @@ (when *main-thread* (bt:join-thread *main-thread*))) +#+thread-support +(export 'join-main-thread) + #-thread-support (defun ensure-gtk-main () (gtk-main))