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

(fix) Waveform viewer: reject focus on click, allow global keyboard shortcuts #13173

Closed
wants to merge 1 commit into from

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Apr 24, 2024

Fixes #13160 for waveforms and spinnies, already noticed in the waveforms PR #10989 (comment)

Focus is still removed from the current focus widget, but cleared right away so keyboard shortcuts still work.

Obviously, it'd be better not to move focus in the first place, but I didn't manage to prevent that.
Previously I tried with eventFilter in OpenGLWindow but that didn't work for some reason.
Also, only rejecting the FocusIn event is not sufficient, even though the child widget has the Qt::NoFocus policy, so it shouldn't accept focus in the first place 🤷‍♂️

edit I'm experiencing inconsitent behaviour: doing another test (since I'm not happy with this hack) it turns out that rejecting the FocusIn is sufficient.
However, I'd still prefer to not focus the QOpenGLWindow in the first place.

@m0dB What do you think?

@github-actions github-actions bot added the ui label Apr 24, 2024
@daschuer daschuer requested a review from m0dB April 24, 2024 18:17
@ronso0 ronso0 changed the title Waveform viewer: reject widget focus, allow global keyboard shortcuts (fix) Waveform viewer: reject focus on click, allow global keyboard shortcuts Apr 24, 2024
@ronso0
Copy link
Member Author

ronso0 commented Apr 25, 2024

now I can't even reproduce the keyboard issue... "verry, verry weird!"
sorry for the noise.

However, now that I'm at it I'll check if the window focus change can be prevented to not steal focus from the main window's widgets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Play/Pause using keyboards shortcuts fails after loading a track due to a focus change introduced in v2.4.0
1 participant