[Scummvm-git-logs] scummvm master -> 807a10bb53e65932b744acd93d66cb05d1df0b14

sev- noreply at scummvm.org
Fri Jan 2 22:20:17 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:
807a10bb53 GRAPHICS: MACGUI: Fix Beam cursor gets stuck after editable editable widget


Commit: 807a10bb53e65932b744acd93d66cb05d1df0b14
    https://github.com/scummvm/scummvm/commit/807a10bb53e65932b744acd93d66cb05d1df0b14
Author: Armaan Singh Sandhu (sandhuc36 at gmail.com)
Date: 2026-01-03T01:20:14+03:00

Commit Message:
GRAPHICS: MACGUI: Fix Beam cursor gets stuck after editable editable widget

If the cursor is moved between the MacWindow and MacTextWindow the
cursor switches to beam and back but when you click in the MacTextWindow
the cursor gets stuck to beam no matter which window or menu you are
hovering over

Changed paths:
    graphics/macgui/macwidget.cpp
    graphics/macgui/macwidget.h
    graphics/macgui/macwindowmanager.cpp


diff --git a/graphics/macgui/macwidget.cpp b/graphics/macgui/macwidget.cpp
index e04d8f98747..f5bd1b49851 100644
--- a/graphics/macgui/macwidget.cpp
+++ b/graphics/macgui/macwidget.cpp
@@ -154,10 +154,20 @@ MacWidget *MacWidget::findEventHandler(Common::Event &event, int dx, int dy) {
 }
 
 Common::Point MacWidget::getAbsolutePos() {
-	if (!_parent)
-		return Common::Point(0, 0);
+	Common::Point absPoint = Common::Point(0, 0);
+	MacWidget *currentParent = _parent;
+	while (currentParent != nullptr) {
+		absPoint = Common::Point(currentParent->_dims.left, currentParent->_dims.top) + absPoint;
+		currentParent = currentParent->_parent;
+	}
+
+	return absPoint;
+}
+
+Common::Rect MacWidget::getAbsoluteDimensions() {
+	Common::Point absPos = getAbsolutePos();
 
-	return Common::Point(_parent->_dims.left, _parent->_dims.top) + _parent->getAbsolutePos();
+	return getDimensions().translate(absPos.x, absPos.y);
 }
 
 } // End of namespace Graphics
diff --git a/graphics/macgui/macwidget.h b/graphics/macgui/macwidget.h
index a1781f3a046..edba41dd1b3 100644
--- a/graphics/macgui/macwidget.h
+++ b/graphics/macgui/macwidget.h
@@ -81,6 +81,7 @@ public:
 	}
 
 	Common::Point getAbsolutePos();
+	Common::Rect getAbsoluteDimensions();
 	MacWidget *findEventHandler(Common::Event &event, int dx, int dy);
 
 	void removeWidget(MacWidget *child, bool del = true);
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 638b27d9fc7..72e8af5deb0 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -1108,7 +1108,7 @@ bool MacWindowManager::processEvent(Common::Event &event) {
 		if ((_windows[_activeWindow]->isEditable() && _windows[_activeWindow]->getType() == kWindowWindow &&
 				 ((MacWindow *)_windows[_activeWindow])->getInnerDimensions().contains(event.mouse.x, event.mouse.y)) ||
 				(_activeWidget && _activeWidget->isEditable() &&
-				 _activeWidget->getDimensions().contains(event.mouse.x, event.mouse.y))) {
+				 _activeWidget->getAbsoluteDimensions().contains(event.mouse.x, event.mouse.y))) {
 			if (getCursorType() != kMacCursorBeam) {
 				_tempType = getCursorType();
 				_inEditableArea = true;




More information about the Scummvm-git-logs mailing list