chiark
/
gitweb
/
~mdw
/
clg
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added *REENTRANT-MAIN-ITERATION* to control if MAIN-ITERATE-ALL can be
[clg]
/
gtk
/
gtkobject.lisp
diff --git
a/gtk/gtkobject.lisp
b/gtk/gtkobject.lisp
index 6171c5bdd8867b5947033474ebca37890d3cccfa..7d57bfdc004692940f481ef498eb07fbd94f3623 100644
(file)
--- a/
gtk/gtkobject.lisp
+++ b/
gtk/gtkobject.lisp
@@
-20,7
+20,7
@@
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-;; $Id: gtkobject.lisp,v 1.4
5 2008-02-28 18:33:12
espen Exp $
+;; $Id: gtkobject.lisp,v 1.4
6 2008-03-04 16:03:38
espen Exp $
(in-package "GTK")
(in-package "GTK")
@@
-56,6
+56,9
@@
(defbinding %object-sink () nil
;;;; Main loop and event handling
;;;; Main loop and event handling
+(defparameter *reentrant-main-iteration* t)
+(defvar *running-main-iteration* nil)
+
(defbinding events-pending-p () boolean)
(defbinding get-current-event () gdk:event)
(defbinding events-pending-p () boolean)
(defbinding get-current-event () gdk:event)
@@
-74,9
+77,11
@@
(defbinding main-iteration-do (&optional (blocking t)) boolean
(defun main-iterate-all (&rest args)
(declare (ignore args))
(defun main-iterate-all (&rest args)
(declare (ignore args))
- (loop
- while (events-pending-p)
- do (main-iteration-do nil))
+ (unless (and (not *reentrant-main-iteration*) *running-main-iteration*)
+ (let ((*running-main-iteration* t))
+ (loop
+ while (events-pending-p)
+ do (main-iteration-do nil))))
#+clisp 0)
#+clisp 0)