Rage hacking on TerminalWidget.

There's some really hideous plumbing with globals going on here, but my
priority right now is getting a basic VT100 terminal emulator working.
This commit is contained in:
Andreas Kling 2018-10-11 12:33:03 +02:00
commit ab5266b924
Notes: sideshowbarker 2024-07-19 18:50:56 +09:00
8 changed files with 136 additions and 15 deletions

View file

@ -25,6 +25,7 @@ void Widget::event(Event& event)
{
switch (event.type()) {
case Event::Paint:
m_hasPendingPaintEvent = false;
return onPaint(static_cast<PaintEvent&>(event));
case Event::Show:
return onShow(static_cast<ShowEvent&>(event));
@ -85,6 +86,9 @@ void Widget::onMouseMove(MouseEvent&)
void Widget::update()
{
if (m_hasPendingPaintEvent)
return;
m_hasPendingPaintEvent = true;
EventLoop::main().postEvent(this, make<PaintEvent>());
}