-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
eframe: Request window focus #2843
Labels
feature
New feature or request
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I'm building an overlay that pops up (using
frame.set_visible
) on a hotkey witheframe
andegui
, and I'd like it to consistently focus the input widget. However,Response::request_focus
does not appear to focus the widget the first time around.I believe this is because the overlay window itself is not focused.
Describe the solution you'd like
eframe::Frame::request_focus
, which requests the frame to be focused on platforms where it's supported.I believe this would be relatively simple for the
winit
backend ofepi
: it should just be a call to winit::Window::focus_window.Describe alternatives you've considered
Response::request_focus
could implicitly focus the window, but that may be unexpected behaviour (especially as it would likely break existing workflows)Additional context
I'm happy to implement this myself and submit a PR, but I wanted to check that this would fit within the purview of
eframe
first.The text was updated successfully, but these errors were encountered: