aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-07-28 08:55:25 -0500
committerColin Okay <colin@cicadas.surf>2022-07-28 08:55:25 -0500
commit259b8df3630487055f5d3e1bc98d245973b3a95e (patch)
treeeba8c329da4e81575b5767c64cb51fda8f46b24d
parent11f8d6dad0078464ccbc29cab57908a0923ca447 (diff)
[bugfix] in calculation of yrel for mousemotion events
-rw-r--r--src/wheelwork.lisp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wheelwork.lisp b/src/wheelwork.lisp
index ab432d5..da432ba 100644
--- a/src/wheelwork.lisp
+++ b/src/wheelwork.lisp
@@ -174,7 +174,9 @@ give focus to whatever was clicked."
(defun eventloop-mousemotion (app wx wy wxrel wyrel state)
(when (should-listen-for-p 'mousemotion app)
(destructuring-bind (x y) (screen-to-world wx wy)
- (destructuring-bind (xrel yrel) (screen-to-world wxrel wyrel)
+ (let* ((scale (application-scale app))
+ (xrel (/ wxrel scale))
+ (yrel (* -1 (/ wyrel scale))))
(let ((*event-still-bubbling-p*
(mouse-motion-events-bubble-p app)))
(loop for target in (mouse-event-targets app x y (mouse-motion-events-bubble-p app))