[Scummvm-git-logs] scummvm master -> 1d4b5b1b66b74eea2c8d01dbc9dfdf601aed3e2c

bluegr noreply at scummvm.org
Sat May 9 08:55:15 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
1d4b5b1b66 GUI: Fix ScrollContainerWidget clicks after scrolling


Commit: 1d4b5b1b66b74eea2c8d01dbc9dfdf601aed3e2c
    https://github.com/scummvm/scummvm/commit/1d4b5b1b66b74eea2c8d01dbc9dfdf601aed3e2c
Author: Scorp (scorp at mrs.mn)
Date: 2026-05-09T11:55:12+03:00

Commit Message:
GUI: Fix ScrollContainerWidget clicks after scrolling

ScrollContainerWidget already reports child absolute positions with the current scroll offset applied through getChildX() and getChildY().

Do not add the scroll offset again when converting mouse down/up events to child-local coordinates. This keeps controls in scrolled containers, such as keymapper rows, clickable after the view has been scrolled.

Changed paths:
    gui/widgets/scrollcontainer.cpp


diff --git a/gui/widgets/scrollcontainer.cpp b/gui/widgets/scrollcontainer.cpp
index cc10cd44cb4..0cdd0fa999b 100644
--- a/gui/widgets/scrollcontainer.cpp
+++ b/gui/widgets/scrollcontainer.cpp
@@ -65,8 +65,8 @@ void ScrollContainerWidget::handleMouseDown(int x, int y, int button, int clickC
 	_fluidScroller->stopAnimation();
 	Widget *child = _childUnderMouse;
 	if (child) {
-		int childX = (x + _scrolledX) - (child->getAbsX() - getAbsX());
-		int childY = (y + _scrolledY) - (child->getAbsY() - getAbsY());
+		int childX = x - (child->getAbsX() - getAbsX());
+		int childY = y - (child->getAbsY() - getAbsY());
 		child->handleMouseDown(childX, childY, button, clickCount);
 
 		if (child->getFlags() & WIDGET_IGNORE_DRAG) {
@@ -125,8 +125,8 @@ void ScrollContainerWidget::handleMouseUp(int x, int y, int button, int clickCou
 	_childUnderMouse = nullptr;
 
 	if (!isDragging && child) {
-		int childX = (x + _scrolledX) - (child->getAbsX() - getAbsX());
-		int childY = (y + _scrolledY) - (child->getAbsY() - getAbsY());
+		int childX = x - (child->getAbsX() - getAbsX());
+		int childY = y - (child->getAbsY() - getAbsY());
 		child->handleMouseUp(childX, childY, button, clickCount);
 	}
 }




More information about the Scummvm-git-logs mailing list