Skip to content

inputWindowFocus support#651

Open
AL2009man wants to merge 1 commit intofgsfdsfgs:portfrom
AL2009man:WindowFocusing
Open

inputWindowFocus support#651
AL2009man wants to merge 1 commit intofgsfdsfgs:portfrom
AL2009man:WindowFocusing

Conversation

@AL2009man
Copy link
Copy Markdown

@AL2009man AL2009man commented Aug 29, 2025

When Alt-Tabbing: there's a chance that the input activity continues to be active, this is relatively fine if using the Controller (but the camera might get "camera snap" as a result), but if using Mouse Input: there's a chance that while the Window isn't focus, and the mouse cursor started to hover: the camera movement can move, at worse: when you alt-tab back in: you might have to correct the movement yourself.

This becomes a bigger problem during work on #644, where the Gyro Movement still becomes active while the window isn't in focus. This PR will address this specific issue where the Input Device method will be temporarily paused when the Window is no longer in focus.

inputWindowFocus can be disabled on pd.ini, and it'll worke exactly how it was before.

to prevent issues with Input Movement/activity while the Window isn't in focus: the ability to only have any input be active based on Window being focused has been added.

this can be disabled on `pd.ini`
@AL2009man
Copy link
Copy Markdown
Author

AL2009man commented Aug 29, 2025

I actually debated whenever or not to use SDL_GetKeyboardFocus (simpler to setup, but it's meant for Keyboards, but still works on all input methods if using helper function) or SDL_WINDOWEVENT, but opted for the latter since it's a bit more accurate over GetKeyboardFocus.

@AL2009man AL2009man changed the title added inputWindowFocus support inputWindowFocus support Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant