From cd440c2da2459c9458201828d3f2ccdbf114e4f8 Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Sat, 4 Jul 2009 10:25:08 +0400 Subject: [PATCH] Added forgotten file --- gtk/sbcl.lisp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gtk/sbcl.lisp 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*)) + -- 1.7.10.4