1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

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
parent f282df6617
commit ab5266b924
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>());
}