Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOARD-patches/sdl2: force window focus(kbd/mouse) and restrict mouse x/y #141

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Apaczer
Copy link
Member

@Apaczer Apaczer commented Nov 26, 2024

Two patches for SDL2:

  • remove GOTFOCUS/LOSTFOCUS events from SDL_DirectFB code, because SDL for real have no idea when it happens with mouse mv, state becomes impossible to check if no-cursor is active and smbd check mouse-hover over window in SDL
  • restrict mouse move in SDL_mouse code to only screen dimmension, otherwise cursor endups travelling to infinity (same happens in df_input example strangely, but no issue in df_window).

This of course will brake multi app usage via SDL backend because all windows will receive the same input events at the same time (funny cuz I tested vanilla sdl and same thing happens), but I don't expect anyone to make any use of that feature in forthcoming future (it is still valid to use multi window via pure directfb).

Tested dethrace and opentyrian, all seems ok and works similary to directfb in sdl1.2

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