Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Force keyboard focus when clicking on UI
  • Loading branch information
falkTX committed Oct 31, 2022
1 parent 8a33946 commit cb8cb9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/ProM/DistrhoUIProM.cpp
Expand Up @@ -297,6 +297,14 @@ bool DistrhoUIProM::onKeyboard(const KeyboardEvent& ev)
return true;
}

bool DistrhoUIProM::onMouse(const MouseEvent& ev)
{
if (ev.press)
getWindow().focus();

return false;
}

// -----------------------------------------------------------------------

UI* createUI()
Expand Down
1 change: 1 addition & 0 deletions plugins/ProM/DistrhoUIProM.hpp
Expand Up @@ -49,6 +49,7 @@ class DistrhoUIProM : public UI

void onDisplay() override;
bool onKeyboard(const KeyboardEvent&) override;
bool onMouse(const MouseEvent& ev) override;

private:
ScopedPointer<projectM> fPM;
Expand Down

0 comments on commit cb8cb9f

Please sign in to comment.