From d38b4e6d08f950eefe80603d6fd6acc0d65c16c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jacek=20TeMPOraL=20Z=C5=82ydach?= <temporal.pl@gmail.com>
Date: Sat, 21 Oct 2017 20:37:30 +0200
Subject: [PATCH] Provided a local implementation for WAIT-FOR-WINDOW-EXPOSED.

Solves issue #18.
---
 clim/menus.lisp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/clim/menus.lisp b/clim/menus.lisp
index bca8b264..51fa2a97 100644
--- a/clim/menus.lisp
+++ b/clim/menus.lisp
@@ -463,8 +463,10 @@
                                       (not (window-visibility menu)))
                              (return-from menu-choose-from-drawer nil))
                            ;; Take care of highlighting
-                           (highlight-presentation-of-context-type menu)))
-                  (declare (dynamic-extent #'input-wait-test #'input-wait-handler))
+                           (highlight-presentation-of-context-type menu))
+                         (wait-for-window-exposed (menu)
+                           (process-wait nil (lambda () (window-visibility menu)))))
+                  (declare (dynamic-extent #'input-wait-test #'input-wait-handler #'wait-for-window-exposed))
                   ;; Await exposure before going any further, since X can get
                   ;; to the call to READ-GESTURE before the menu is visible.
                   (when *abort-menus-when-buried*
-- 
GitLab