diff --git a/Engine/source/windowManager/sdl/sdlWindow.cpp b/Engine/source/windowManager/sdl/sdlWindow.cpp index 67b636a2a..c64da01be 100644 --- a/Engine/source/windowManager/sdl/sdlWindow.cpp +++ b/Engine/source/windowManager/sdl/sdlWindow.cpp @@ -646,7 +646,11 @@ void PlatformWindowSDL::_processSDLEvent(SDL_Event &evt) break; case SDL_WINDOWEVENT_MOVED: { + S32 oldDisplay = Con::getIntVariable("pref::Video::deviceId", 0); _updateMonitorFromMove(evt); + // If display device has changed, make sure window params are compatible with the new device. + if (oldDisplay != Con::getIntVariable("pref::Video::deviceId", 0)) + Con::evaluate("configureCanvas();"); break; } case SDL_WINDOWEVENT_RESIZED: @@ -672,11 +676,6 @@ void PlatformWindowSDL::_processSDLEvent(SDL_Event &evt) case SDL_WINDOWEVENT_RESTORED: Con::setBoolVariable("pref::Video::isMaximized", false); break; - case SDL_WINDOWEVENT_DISPLAY_CHANGED: - Con::printf("Window moved to display #%d", evt.window.data1); - Con::setIntVariable("pref::Video::deviceId", evt.window.data1); - Con::evaluate("configureCanvas();"); - break; default: break;