diff options
author | Daniel Kochmański <daniel@turtleware.eu> | 2023-11-29 09:07:43 +0100 |
---|---|---|
committer | Daniel Kochmański <daniel@turtleware.eu> | 2023-11-29 09:07:43 +0100 |
commit | 0b300275dc66a4c810380666a1c096cb7f0f249d (patch) | |
tree | 67bc36b0deb273183c57339b512f28f3908094a8 | |
parent | 099b7f33e63877c829ad6a35311ccee8a5ed1141 (diff) |
scroll-extent*: don't scroll when the point is in the viewport
-rw-r--r-- | Core/clim-core/panes/composition.lisp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Core/clim-core/panes/composition.lisp b/Core/clim-core/panes/composition.lisp index c4052d0d..cb5eb4d3 100644 --- a/Core/clim-core/panes/composition.lisp +++ b/Core/clim-core/panes/composition.lisp @@ -1575,9 +1575,11 @@ SCROLLER-PANE appear on the ergonomic left hand side, or leave set to distance)) (with-bounding-rectangle* (x1 y1 x2 y2) (sheet-visible-region pane) (with-bounding-rectangle* (tx1 ty1 tx2 ty2) thing - (let ((x0 (snap x1 x2 tx1 tx2)) - (y0 (snap y1 y2 ty1 ty2))) - (scroll-extent pane (- x1 x0) (- y1 y0))))))) + (let ((nx (- x1 (snap x1 x2 tx1 tx2))) + (ny (- y1 (snap y1 y2 ty1 ty2)))) + (unless (and (<= x1 nx x2) + (<= y1 ny y2)) + (scroll-extent pane nx ny))))))) ;;; LABEL PANE |