[Scummvm-git-logs] scummvm master -> 293b648745d223c96c75b63f5b15a90b1458d64a
SupSuper
supsuper at gmail.com
Fri Oct 9 23:14:42 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
293b648745 SDL: Only handle events from current display window
Commit: 293b648745d223c96c75b63f5b15a90b1458d64a
https://github.com/scummvm/scummvm/commit/293b648745d223c96c75b63f5b15a90b1458d64a
Author: SupSuper (supsuper at gmail.com)
Date: 2020-10-10T00:14:10+01:00
Commit Message:
SDL: Only handle events from current display window
This fixes the GraphicsManager reacting to dummy window events from testing OpenGL hardware capabilities
Changed paths:
backends/events/sdl/sdl-events.cpp
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 14c467279d..68c7e43b7e 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -513,6 +513,19 @@ bool SdlEventSource::dispatchSDLEvent(SDL_Event &ev, Common::Event &event) {
}
case SDL_WINDOWEVENT:
+ // We're only interested in events from the current display window
+ if (_graphicsManager) {
+ uint32 windowID = 0;
+ if (dynamic_cast<SdlGraphics3dManager *>(_graphicsManager)) {
+ windowID = SDL_GetWindowID(dynamic_cast<SdlGraphics3dManager *>(_graphicsManager)->getWindow()->getSDLWindow());
+ } else if (dynamic_cast<SdlGraphicsManager *>(_graphicsManager)) {
+ windowID = SDL_GetWindowID(dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindow()->getSDLWindow());
+ }
+ if (windowID != ev.window.windowID) {
+ return false;
+ }
+ }
+
switch (ev.window.event) {
case SDL_WINDOWEVENT_EXPOSED:
if (_graphicsManager) {
More information about the Scummvm-git-logs
mailing list