LibCore+LibGUI: Remove GEventLoop and use CEventLoop everywhere

GEventLoop was just a dummy subclass of CEventLoop anyway. The only
thing it actually did was make sure a GWindowServerConnectionw was
instantiated. We now take care of that in GApplication instead.

CEventLoop is now non-virtual and a little less confusing. :^)
This commit is contained in:
Andreas Kling 2019-09-22 20:50:39 +02:00
parent edac8704de
commit 34d0e96aec
Notes: sideshowbarker 2024-07-19 12:00:10 +09:00
12 changed files with 23 additions and 42 deletions

View file

@ -497,12 +497,12 @@ void GWindow::set_focused_widget(GWidget* widget)
if (m_focused_widget == widget)
return;
if (m_focused_widget) {
GEventLoop::current().post_event(*m_focused_widget, make<GEvent>(GEvent::FocusOut));
CEventLoop::current().post_event(*m_focused_widget, make<GEvent>(GEvent::FocusOut));
m_focused_widget->update();
}
m_focused_widget = widget ? widget->make_weak_ptr() : nullptr;
if (m_focused_widget) {
GEventLoop::current().post_event(*m_focused_widget, make<GEvent>(GEvent::FocusIn));
CEventLoop::current().post_event(*m_focused_widget, make<GEvent>(GEvent::FocusIn));
m_focused_widget->update();
}
}
@ -567,12 +567,12 @@ void GWindow::set_hovered_widget(GWidget* widget)
return;
if (m_hovered_widget)
GEventLoop::current().post_event(*m_hovered_widget, make<GEvent>(GEvent::Leave));
CEventLoop::current().post_event(*m_hovered_widget, make<GEvent>(GEvent::Leave));
m_hovered_widget = widget ? widget->make_weak_ptr() : nullptr;
if (m_hovered_widget)
GEventLoop::current().post_event(*m_hovered_widget, make<GEvent>(GEvent::Enter));
CEventLoop::current().post_event(*m_hovered_widget, make<GEvent>(GEvent::Enter));
}
void GWindow::set_current_backing_bitmap(GraphicsBitmap& bitmap, bool flush_immediately)