Fix various issues with child window positioning

This commit is contained in:
2024-12-25 19:45:10 +02:00
committed by Ari Vuollet
parent ebe09403f5
commit e3b242f2ba
8 changed files with 185 additions and 190 deletions

View File

@@ -364,7 +364,10 @@ public:
public:
Float2 GetMousePosition() const
/// <summary>
/// Returns the previous known position of the mouse before entering relative mode.
/// </summary>
Float2 GetOldMousePosition() const
{
return oldPosition;
}
@@ -509,7 +512,7 @@ bool SDLInput::HandleEvent(SDLWindow* window, SDL_Event& event)
{
// Use the previous visible mouse position here, the event or global
// mouse position would cause input to trigger in other editor windows.
mousePos = SDLInputImpl::Mouse->GetMousePosition();
mousePos = SDLInputImpl::Mouse->GetOldMousePosition();
}
if (!event.button.down)
@@ -531,7 +534,7 @@ bool SDLInput::HandleEvent(SDLWindow* window, SDL_Event& event)
{
// Use the previous visible mouse position here, the event or global
// mouse position would cause input to trigger in other editor windows.
mousePos = SDLInputImpl::Mouse->GetMousePosition();
mousePos = SDLInputImpl::Mouse->GetOldMousePosition();
}
Input::Mouse->OnMouseWheel(mousePos, delta, window);