Skip to content

Commit

Permalink
add changes from redkite (shortcuts)
Browse files Browse the repository at this point in the history
  • Loading branch information
iurienistor committed May 8, 2024
1 parent c91868b commit b8edf6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* File name: MainWindow.cpp
* Project: Geonkick (A kick synthesizer)
*
* Copyright (C) 2017 Iurie Nistor
* Copyright (C) 2017 Iurie Nistor
*
* This file is part of Geonkick.
*
Expand Down Expand Up @@ -184,7 +184,7 @@ bool MainWindow::init(void)
envelopeWidget->setY(topBar->y() + topBar->height());
envelopeWidget->setFixedSize(850, 305);
envelopeWidget->show();

RK_ACT_BIND(this, updateGui, RK_ACT_ARGS(), envelopeWidget, updateGui());
RK_ACT_BIND(envelopeWidget, requestUpdateGui, RK_ACT_ARGS(), this, updateGui());
limiterWidget = new Limiter(geonkickApi, this);
Expand Down
20 changes: 5 additions & 15 deletions src/redkite/src/RkEventQueueImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,9 @@ void RkEventQueue::RkEventQueueImpl::processEvents()
continue;
}

static int n = 10;
if (e.second->type() == RkEvent::Type::MouseMove) {
if (dynamic_cast<RkWidget*>(e.first)->widgetFlags() == Rk::WidgetFlags::Popup) {
RK_LOG_DEV_DEBUG("[" << dynamic_cast<RkWidget*>(e.first) << "]Popup: RkEvent::Type::MouseMove: " << n++);
} else {
RK_LOG_DEV_DEBUG("[" << dynamic_cast<RkWidget*>(e.first) << "]" << n++);
}
if (e.second->type() == RkEvent::Type::KeyPressed
|| e.second->type() == RkEvent::Type::KeyReleased) {
processShortcuts(dynamic_cast<RkKeyEvent*>(e.second.get()));
}

if (!popupList.empty() && dynamic_cast<RkWidget*>(e.first)
Expand Down Expand Up @@ -232,11 +228,6 @@ void RkEventQueue::RkEventQueueImpl::processPopups(RkWidget *widget, RkEvent* ev

void RkEventQueue::RkEventQueueImpl::processShortcuts(RkKeyEvent *event)
{
/* if (!event) {
RK_LOG_ERROR("wrong arguments");
return;
}
if (static_cast<RkKeyEvent*>(event)->isShortcut())
return;

Expand All @@ -252,12 +243,11 @@ void RkEventQueue::RkEventQueueImpl::processShortcuts(RkKeyEvent *event)
shurtcutEvent->setKey(event->key());
shurtcutEvent->setModifiers(event->modifiers());
shurtcutEvent->setShortcut();
auto pair = std::make_pair(obj, std::move(shurtcutEvent));
eventsQueue.push_back(std::move(pair));
RK_IMPL_PTR(obj)->event(shurtcutEvent.get());
}
} else {
RK_LOG_DEBUG("can't find shortcut");
}*/
}
}

void RkEventQueue::RkEventQueueImpl::postAction(std::unique_ptr<RkAction> act)
Expand Down

0 comments on commit b8edf6f

Please sign in to comment.