Skip to content

Commit cb8cb9f

Browse files
committed
Force keyboard focus when clicking on UI
1 parent 8a33946 commit cb8cb9f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

plugins/ProM/DistrhoUIProM.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,14 @@ bool DistrhoUIProM::onKeyboard(const KeyboardEvent& ev)
297297
return true;
298298
}
299299

300+
bool DistrhoUIProM::onMouse(const MouseEvent& ev)
301+
{
302+
if (ev.press)
303+
getWindow().focus();
304+
305+
return false;
306+
}
307+
300308
// -----------------------------------------------------------------------
301309

302310
UI* createUI()

plugins/ProM/DistrhoUIProM.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class DistrhoUIProM : public UI
4949

5050
void onDisplay() override;
5151
bool onKeyboard(const KeyboardEvent&) override;
52+
bool onMouse(const MouseEvent& ev) override;
5253

5354
private:
5455
ScopedPointer<projectM> fPM;

0 commit comments

Comments
 (0)