[Scummvm-cvs-logs] SF.net SVN: scummvm: [23142] scummvm/branches/branch-0-9-0/gui/newgui.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Fri Jun 16 08:26:50 CEST 2006


Revision: 23142
Author:   eriktorbjorn
Date:     2006-06-15 23:26:40 -0700 (Thu, 15 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=23142&view=rev

Log Message:
-----------
Backported possible fix for strange pop-up widget behaviour.

Modified Paths:
--------------
    scummvm/branches/branch-0-9-0/gui/newgui.cpp
Modified: scummvm/branches/branch-0-9-0/gui/newgui.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/gui/newgui.cpp	2006-06-16 06:26:26 UTC (rev 23141)
+++ scummvm/branches/branch-0-9-0/gui/newgui.cpp	2006-06-16 06:26:40 UTC (rev 23142)
@@ -201,6 +201,9 @@
 		uint32 time = _system->getMillis();
 
 		while (_system->pollEvent(event)) {
+			if (activeDialog != _dialogStack.top() && event.type != OSystem::EVENT_QUIT && event.type != OSystem::EVENT_SCREEN_CHANGED)
+				continue;
+
 			Common::Point mouse(event.mouse.x - activeDialog->_x, event.mouse.y - activeDialog->_y);
 			
 			switch (event.type) {
@@ -270,7 +273,7 @@
 		}
 
 		// check if event should be sent again (keydown)
-		if (_currentKeyDown.keycode != 0) {
+		if (_currentKeyDown.keycode != 0 && activeDialog == _dialogStack.top()) {
 			if (_keyRepeatTime < time) {
 				// fire event
 				activeDialog->handleKeyDown(_currentKeyDown.ascii, _currentKeyDown.keycode, _currentKeyDown.flags);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list