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

Setting a Parent or Owner Window (whether OS-native or SDL Window) #7231

Closed
time-killer-games opened this issue Feb 3, 2023 · 3 comments
Closed
Milestone

Comments

@time-killer-games
Copy link
Contributor

time-killer-games commented Feb 3, 2023

Something similar to what I'm doing here, making my dialog have an owner and then place the dialog in the center of the parent window's size/position, and if parent is zero or nullptr than ignore the parent/owner paremeter.

https://github.com/time-killer-games/libfiledialogs/blob/6a169748b115ae26295ad5bbfa4b5d2ec7f788e9/filedialogs/filedialogs.cpp#L248-L333

Note my code only covers Win32 WinAPI, macOS AppKit, and X11 Xlib platforms. Wayland and anything else which may exist out there still needs fresh code written. Ignore the pointer to integer casting my code does, that is unique to my use case.

@slouken slouken added this to the 3.2.0 milestone Nov 8, 2023
@slouken
Copy link
Collaborator

slouken commented May 21, 2024

Does SDL_SetWindowModalFor() do what you need?

@time-killer-games
Copy link
Contributor Author

Does SDL_SetWindowModalFor() do what you need?

Yes, actually! Thank you for bringing that one to my attention.

@slouken
Copy link
Collaborator

slouken commented May 22, 2024

You’re welcome!

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

No branches or pull requests

2 participants