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:
parent
f282df6617
commit
ab5266b924
8 changed files with 136 additions and 15 deletions
|
@ -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>());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue