summaryrefslogtreecommitdiff
path: root/plugingui/eventhandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/eventhandler.cc')
-rw-r--r--plugingui/eventhandler.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugingui/eventhandler.cc b/plugingui/eventhandler.cc
index 083efae..a5249a6 100644
--- a/plugingui/eventhandler.cc
+++ b/plugingui/eventhandler.cc
@@ -55,10 +55,10 @@ std::shared_ptr<Event> EventHandler::peekNextEvent()
void EventHandler::processEvents()
{
+ Painter p(window); // Make sure we only redraw buffer one time.
+
while(hasEvent())
{
- Painter p(window); // Make sure we only redraw buffer one time.
-
auto event = getNextEvent();
if(event == nullptr)
@@ -71,6 +71,13 @@ void EventHandler::processEvents()
window.redraw();
break;
+ case EventType::move:
+ {
+ auto moveEvent = static_cast<MoveEvent*>(event.get());
+ window.moved(moveEvent->x, moveEvent->y);
+ }
+ break;
+
case EventType::resize:
{
while(true)