Set input focus on alt-click
I have submitted a PR for the input focus issue (https://github.com/RustAudio/baseview/pull/170). Assuming it is accepted and merged in baseview these are the changes required on vizia_baseview.
I have opted for the least intrusive call on alt-click but I wonder if there are other occasions that would need it. Let me know what you think.
I have tested this as mentioned in the baseview PR.
I've opened #466 which allows window events to be handled by baseview. I think this could be used in conjunction with what you have here to focus the window when requested by say a textbox being focused etc.
I've opened #466 which allows window events to be handled by baseview. I think this could be used in conjunction with what you have here to focus the window when requested by say a textbox being focused etc.
Are you thinking of adding something like this:
ViziaWindow { application, on_idle, should_close: false, should_focus: false }
and then handling the event similarly to what you did for close?
I've opened #466 which allows window events to be handled by baseview. I think this could be used in conjunction with what you have here to focus the window when requested by say a textbox being focused etc.
Are you thinking of adding something like this:
ViziaWindow { application, on_idle, should_close: false, should_focus: false }and then handling the event similarly to what you did for close?
No, that's only there for close because closing the window needs to happen after event handling. What I'm proposing is adding a focus event to WindowEvent, which can be emitted by a textbox and then handled by the callback I've added to the process events function so that the relevant function can be called on the baseview window.
No, that's only there for close because closing the window needs to happen after event handling. What I'm proposing is adding a focus event to
WindowEvent, which can be emitted by a textbox and then handled by the callback I've added to the process events function so that the relevant function can be called on the baseview window.
Oh, I see. So I will just have to add the focus code inside handle_event in its own event handler right? That should be fine though we still need to pass in the window.
Oh, I see. So I will just have to add the focus code inside
handle_eventin its own event handler right? That should be fine though we still need to pass in the window.
The focus code would go inside the closure I've added to process_events in the linked PR. You can pass the window into this and call focus on it.
The focus code would go inside the closure I've added to
process_eventsin the linked PR. You can pass the window into this and call focus on it.
Ok, I will have a look thank you. Unfortunately at the moment vizia and nih_plug are out of sync. I still need to use Robbert's Vizia fork locally to test the input focus fix. Once the changes are merged in nih_plug_vizia I can implement and test.