mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
libobs: Trigger bindings injected by Qt directly
Instead of lettings the hotkey thread handle bindings triggered by Qt, call the callback directly. By this point, Qt has resolved the modifier state (so no need for the hotkey thread to do the same), the pressed state is set as well, the branch takes care of matching the pressed keys. This also fixes the issue with the hotkey changes introduced by #3914, which only inject key events when OBS is _not_ in focus (and as such modifier states are never updated).
This commit is contained in:
parent
25d84f40d6
commit
ab62c9c615
@ -1289,8 +1289,14 @@ static inline bool inject_hotkey(void *data, size_t idx,
|
||||
event->strict_modifiers)) {
|
||||
bool pressed = binding->key.key == event->hotkey.key &&
|
||||
event->pressed;
|
||||
handle_binding(binding, event->hotkey.modifiers, false,
|
||||
event->strict_modifiers, &pressed);
|
||||
if (binding->key.key == OBS_KEY_NONE)
|
||||
pressed = true;
|
||||
|
||||
if (pressed) {
|
||||
binding->modifiers_match = true;
|
||||
if (!binding->pressed)
|
||||
press_released_binding(binding);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user