System Information
- Ogre Version: 14.4.1
- Operating System / Platform: Windows 11
- RenderSystem: OpenGL
Detailled description
RenderWindow::getMetrics() reports stale top and left values after the window has been moved, unless it has also been resized. It seems to come down to ApplicationContextSDL not calling RenderWindow::reposition when processing a window move event. This is the relevant code in ApplicationContextSDL::pollEvents():
case SDL_WINDOWEVENT:
if(event.window.event != SDL_WINDOWEVENT_RESIZED)
continue;
for(auto & window : mWindows)
{
if(event.window.windowID != SDL_GetWindowID(window.native))
continue;
Ogre::RenderWindow* win = window.render;
win->resize(event.window.data1, event.window.data2);
windowResized(win);
}
break;
It seems like we should be doing something similar for SDL_WINDOWEVENT_MOVED events. I can give that a go if you're happy with me trying.
System Information
Detailled description
RenderWindow::getMetrics() reports stale top and left values after the window has been moved, unless it has also been resized. It seems to come down to ApplicationContextSDL not calling RenderWindow::reposition when processing a window move event. This is the relevant code in ApplicationContextSDL::pollEvents():
It seems like we should be doing something similar for SDL_WINDOWEVENT_MOVED events. I can give that a go if you're happy with me trying.