-
Notifications
You must be signed in to change notification settings - Fork 26
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 alt tab bug with blender qt wrapping #32
Conversation
Attempting to fix the Alt-Hang when Alt-Tabbing between Blender and other applications by running a modal operator that checks if the window just got focus back. If that is the case, check if Blender perceives an event containing CTRL/ALT/SHIFT and fire a release event on the keyboard. Does not catch all cases. # Conflicts: # bqt/blender_applications/win32_blender_application.py # requirements.txt
note there is some weirdness going on with order of registering handles. this is the only issue i dont understand why it happens. |
consider to remove instantiate_application from bqt startup since it's called twice (second time doesn't do anything) |
pass all events (e.g. keypress, mouse-move, ...) to detect_keyboard | ||
""" | ||
# if context.area: | ||
# context.area.tag_redraw() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@friedererdmann this was included in your code, do you know what this is for?
commented it out and doesn't seem needed
fix for when ctrl alt tab dont work if they are the first key pressed on a blender refocus
pushed a bug-fix for when the keys we release didn't work when they were the first pressed on blender refocus. |
this is now ready to review & merge |
# Conflicts: # bqt/__init__.py
TODO add support for windows key, has same issue as alt and ctrl etc. |
this PR fixes the alt-tab bug with embedding blender in QT.
build on top of @friedererdmann his PR
new stuff:
alt tab fix with keyboard
friedererdmann did a setup to run the release alt ctrl key etc when blender gets focus.
however it checked if the event type was matching the key that was stuck.
if the alt key is stuck, i cant copy paste (ctrl-v).
however since i dont press alt, the fix event wont run.
a simple solution is to have any event type, trigger the fix event.
now when i type ctrl-v, this will run the fix once, undoing the alt key being stuck.
ensure fix stays in place when opening new scene
there was a logic issue where the focus handle did not run on a new scene.
because it piggy backed on the existing create_global_app handle. which removed itself after running once.
causing the on focus also to be removed.
solution is moving to different handle