From: Dmitry Kalyanov Date: Sat, 4 Jul 2009 06:25:08 +0000 (+0400) Subject: Added forgotten file X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=cd440c2da2459c9458201828d3f2ccdbf114e4f8;p=cl-gtk2.git Added forgotten file --- diff --git a/gtk/sbcl.lisp b/gtk/sbcl.lisp new file mode 100644 index 0000000..59830eb --- /dev/null +++ b/gtk/sbcl.lisp @@ -0,0 +1,14 @@ +(in-package :gtk) + +#+thread-support +(progn + (defun stop-main-thread-on-save () + (when (and *main-thread* (bt:thread-alive-p *main-thread*)) + (within-main-loop-and-wait (gtk-main-quit)) + (bt:destroy-thread *main-thread*) + (setf *main-thread* nil))) + (defun cl-gtk2-sbcl-init () + (gtk-init)) + (pushnew 'cl-gtk2-sbcl-init sb-ext:*init-hooks*) + (pushnew 'stop-main-thread-on-save sb-ext:*save-hooks*)) +