[Scummvm-git-logs] scummvm master -> 23e2a61d4ed058313654ac64327684d49d79af54

sev- sev at scummvm.org
Sun Sep 4 16:49:53 CEST 2016


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:
23e2a61d4e SDL: Move mouse in SDL2 only when window has focus.


Commit: 23e2a61d4ed058313654ac64327684d49d79af54
    https://github.com/scummvm/scummvm/commit/23e2a61d4ed058313654ac64327684d49d79af54
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-04T16:48:50+02:00

Commit Message:
SDL: Move mouse in SDL2 only when window has focus.

Changed paths:
    backends/platform/sdl/sdl-window.cpp



diff --git a/backends/platform/sdl/sdl-window.cpp b/backends/platform/sdl/sdl-window.cpp
index 6d35f77..609186a 100644
--- a/backends/platform/sdl/sdl-window.cpp
+++ b/backends/platform/sdl/sdl-window.cpp
@@ -150,7 +150,7 @@ bool SdlWindow::hasMouseFocus() const {
 
 void SdlWindow::warpMouseInWindow(uint x, uint y) {
 #if SDL_VERSION_ATLEAST(2, 0, 0)
-	if (_window) {
+	if (_window && hasMouseFocus()) {
 		SDL_WarpMouseInWindow(_window, x, y);
 	}
 #else





More information about the Scummvm-git-logs mailing list