Browse Source

Force keyboard focus when clicking on UI

master
falkTX 3 years ago
parent
commit
cb8cb9f224
2 changed files with 9 additions and 0 deletions
  1. +8
    -0
      plugins/ProM/DistrhoUIProM.cpp
  2. +1
    -0
      plugins/ProM/DistrhoUIProM.hpp

+ 8
- 0
plugins/ProM/DistrhoUIProM.cpp View File

@@ -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()


+ 1
- 0
plugins/ProM/DistrhoUIProM.hpp View File

@@ -49,6 +49,7 @@ protected:

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

private:
ScopedPointer<projectM> fPM;


Loading…
Cancel
Save