Wait 5 cycles before giving keyboard focus to UI
This commit is contained in:
parent
c46d659340
commit
9ba7c624b8
2 changed files with 4 additions and 4 deletions
2
dpf
2
dpf
|
@ -1 +1 @@
|
||||||
Subproject commit cd1861ae893c21045e9f47245bf41cabca7d5f2f
|
Subproject commit 081d4d7392ef587f46dc3b216369655828bbda7f
|
|
@ -244,7 +244,7 @@ class CardinalUI : public CardinalBaseUI,
|
||||||
rack::math::Vec lastMousePos;
|
rack::math::Vec lastMousePos;
|
||||||
WindowParameters windowParameters;
|
WindowParameters windowParameters;
|
||||||
int rateLimitStep = 0;
|
int rateLimitStep = 0;
|
||||||
bool firstIdle = true;
|
int8_t counterForSelfFocus = 0;
|
||||||
|
|
||||||
struct ScopedContext {
|
struct ScopedContext {
|
||||||
CardinalPluginContext* const context;
|
CardinalPluginContext* const context;
|
||||||
|
@ -368,9 +368,9 @@ public:
|
||||||
|
|
||||||
void uiIdle() override
|
void uiIdle() override
|
||||||
{
|
{
|
||||||
if (firstIdle)
|
if (counterForSelfFocus >= 0 && ++counterForSelfFocus == 5)
|
||||||
{
|
{
|
||||||
firstIdle = false;
|
counterForSelfFocus = -1;
|
||||||
getWindow().focus();
|
getWindow().focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue