From 80ef283eb1e11018e8f86b809110013e2313df57 Mon Sep 17 00:00:00 2001 From: stephena Date: Fri, 10 Jun 2005 18:46:11 +0000 Subject: [PATCH] Continuous mouse click events now work, as long as the mouse isn't being moved. That means you can click on the arrows in a scrollbar, and keeping the button pressed will keep clicking the arrows. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@480 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/gui/DialogContainer.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stella/src/gui/DialogContainer.cxx b/stella/src/gui/DialogContainer.cxx index b36b68672..1512a3cb5 100644 --- a/stella/src/gui/DialogContainer.cxx +++ b/stella/src/gui/DialogContainer.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: DialogContainer.cxx,v 1.8 2005-06-07 21:22:39 stephena Exp $ +// $Id: DialogContainer.cxx,v 1.9 2005-06-10 18:46:11 stephena Exp $ //============================================================================ #include "OSystem.hxx" @@ -62,7 +62,6 @@ void DialogContainer::updateTime(uInt32 time) myKeyRepeatTime = myTime + kKeyRepeatSustainDelay; } -/* FIXME - there are still some problems with this code if(myCurrentMouseDown.button != -1 && myClickRepeatTime < myTime) { activeDialog->handleMouseDown(myCurrentMouseDown.x - activeDialog->_x, @@ -70,7 +69,6 @@ void DialogContainer::updateTime(uInt32 time) myCurrentMouseDown.button, 1); myClickRepeatTime = myTime + kClickRepeatSustainDelay; } -*/ } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -158,6 +156,9 @@ void DialogContainer::handleMouseMotionEvent(int x, int y, int button) activeDialog->handleMouseMoved(x - activeDialog->_x, y - activeDialog->_y, button); + + // Turn off continuous click events as soon as the mouse moves + myCurrentMouseDown.button = -1; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -