From 18239f0fb0e6e425d3dd63594e5816e2a83b3a94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jacek=20TeMPOraL=20Z=C5=82ydach?= <temporal.pl@gmail.com>
Date: Sat, 3 Jun 2017 14:37:12 +0200
Subject: [PATCH] Added puzzle demo.

+ notes about gesture handling breaking on mouse scroll wheel
+ dropped a (declare (values ...)) in #'do-text-screen-real-estate.
---
 clim/gestures.lisp        | 6 ++++--
 clim/output-protocol.lisp | 3 +--
 gramps-clim2.asd          | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/clim/gestures.lisp b/clim/gestures.lisp
index 7288d190..dbc91ecc 100644
--- a/clim/gestures.lisp
+++ b/clim/gestures.lisp
@@ -138,6 +138,8 @@
     (keyboard-event                        ;--- KEY-PRESS-EVENT?
       (keyboard-event-matches-gesture-name-p event gesture-name port))))
 
+;;; NOTE seems to break with a NIL somewhere if mouse scroll wheel is used.
+;;; -- jacek.zlydach 2017-06-03
 (defun button-press-event-matches-gesture-name-p (event gesture-name &optional port)
   #---ignore (declare (ignore port))
   #+++ignore (unless port
@@ -146,8 +148,8 @@
         (modifier-state (event-modifier-state event)))
     (declare (type fixnum button modifier-state))
     (button-and-modifier-state-matches-gesture-name-p
-      (- (integer-length button) #.(integer-length +pointer-left-button+))
-      modifier-state gesture-name)))
+     (- (integer-length button) #.(integer-length +pointer-left-button+))
+     modifier-state gesture-name)))
 
 ;; GESTURE-NAME either names a gesture, or is a canonicalized gesture spec
 (defun keyboard-event-matches-gesture-name-p (event gesture-name &optional port)
diff --git a/clim/output-protocol.lisp b/clim/output-protocol.lisp
index b2d69c8d..57147cf6 100644
--- a/clim/output-protocol.lisp
+++ b/clim/output-protocol.lisp
@@ -1061,8 +1061,7 @@
                                        string start end
                                        cursor-x cursor-y height baseline style max-x)
   ;; Continuation is a function which takes L T R B Baseline
-  (declare (dynamic-extent continuation)
-           (values new-cursor-x new-cursor-y new-height new-baseline))
+  (declare (dynamic-extent continuation))
   (unless start (setq start 0))
   (unless end (setq end (length string)))
   (let ((vsp (stream-vertical-spacing stream))
diff --git a/gramps-clim2.asd b/gramps-clim2.asd
index 806fd216..91857d6b 100644
--- a/gramps-clim2.asd
+++ b/gramps-clim2.asd
@@ -215,7 +215,7 @@
              ;(:file "cad-demo" :depends-on ("demo-driver"))
              ;(:file "navdata" :depends-on ("packages"))
              ;(:file "navfun" :depends-on ("navdata"))
-             ;(:file "puzzle" :depends-on ("demo-driver"))
+             (:file "puzzle" :depends-on ("demo-driver"))
              ;(:file "address-book" :depends-on ("demo-driver"))
              ;(:file "thinkadot" :depends-on ("demo-driver"))
              ;(:file "plot" :depends-on ("demo-driver"))
-- 
GitLab