[Scummvm-git-logs] scummvm master -> cd7bddf644d06c2fcc8d38773d3446bc273660e8

sev- sev at scummvm.org
Sat Nov 12 12:09:17 CET 2016


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

Summary:
b1c678f509 GUI: Fix "eaten" event by dialog which was closed
cd7bddf644 Merge pull request #720 from ottogin/gui-events-fix


Commit: b1c678f509ce8bcdd599ec212dc9ddb71d0800b0
    https://github.com/scummvm/scummvm/commit/b1c678f509ce8bcdd599ec212dc9ddb71d0800b0
Author: ottogin (lukartoil at mail.ru)
Date: 2016-03-24T21:31:53+03:00

Commit Message:
GUI: Fix "eaten" event by dialog which was closed

This patch fix bug #6841
If this runloop catches both the repeated key down event and the key up event.
In this case they key down will close the tooltip, because it got closed the key up event will be ignored.
As a result the LauncherDialog will never get notified the SHIFT state might have changed and not adapt the button description.
In this patch we just pass event to topDialog, if activeDialog was closed.
Also we must check, If topDialog doesn't exist.

Changed paths:
    gui/gui-manager.cpp



diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 20c6d3f..ef37990 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -331,10 +331,13 @@ void GuiManager::runLoop() {
 			//
 			// This hopefully fixes strange behavior/crashes with pop-up widgets. (Most easily
 			// triggered in 3x mode or when running ScummVM under Valgrind.)
-			if (activeDialog != getTopDialog() && event.type != Common::EVENT_SCREEN_CHANGED)
-				continue;
-
+			if (activeDialog != getTopDialog() && event.type != Common::EVENT_SCREEN_CHANGED) {
+				processEvent(event, getTopDialog());
+				continue;		
+			}
+			
 			processEvent(event, activeDialog);
+			
 
 			if (event.type == Common::EVENT_MOUSEMOVE) {
 				tooltipCheck = true;
@@ -512,6 +515,8 @@ void GuiManager::screenChange() {
 }
 
 void GuiManager::processEvent(const Common::Event &event, Dialog *const activeDialog) {
+	if (activeDialog == 0)
+		return;
 	int button;
 	uint32 time;
 	Common::Point mouse(event.mouse.x - activeDialog->_x, event.mouse.y - activeDialog->_y);


Commit: cd7bddf644d06c2fcc8d38773d3446bc273660e8
    https://github.com/scummvm/scummvm/commit/cd7bddf644d06c2fcc8d38773d3446bc273660e8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-11-12T12:09:14+01:00

Commit Message:
Merge pull request #720 from ottogin/gui-events-fix

GUI: Fix "eaten" event by dialog which was closed

Changed paths:
    gui/gui-manager.cpp



diff --cc gui/gui-manager.cpp
index 9d68d76,ef37990..d28a0df
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@@ -326,15 -331,23 +326,18 @@@ void GuiManager::runLoop() 
  			//
  			// This hopefully fixes strange behavior/crashes with pop-up widgets. (Most easily
  			// triggered in 3x mode or when running ScummVM under Valgrind.)
- 			if (activeDialog != getTopDialog() && event.type != Common::EVENT_SCREEN_CHANGED)
- 				continue;
- 
+ 			if (activeDialog != getTopDialog() && event.type != Common::EVENT_SCREEN_CHANGED) {
+ 				processEvent(event, getTopDialog());
+ 				continue;		
+ 			}
+ 			
  			processEvent(event, activeDialog);
+ 			
  
 -			if (event.type == Common::EVENT_MOUSEMOVE) {
 -				tooltipCheck = true;
 -			}
 -
 -
  			if (lastRedraw + waitTime < _system->getMillis(true)) {
 +				lastRedraw = _system->getMillis(true);
  				_theme->updateScreen();
  				_system->updateScreen();
 -				lastRedraw = _system->getMillis(true);
  			}
  		}
  





More information about the Scummvm-git-logs mailing list