1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:28:13 +00:00
serenity/Kernel/WindowComposer.cpp
Andreas Kling b0e3f73375 Start refactoring the windowing system to use an event loop.
Userspace programs can now open /dev/gui_events and read a stream of GUI_Event
structs one at a time.

I was stuck on a stupid problem where we'd reenter Scheduler::yield() due to
having one of the has_data_available_for_reading() implementations using locks.
2019-01-14 14:42:49 +01:00

23 lines
578 B
C++

#include "WindowComposer.h"
#include "Process.h"
#include <Widgets/Font.h>
#include <Widgets/FrameBuffer.h>
#include <Widgets/WindowManager.h>
#include <Widgets/EventLoop.h>
#include <Widgets/Window.h>
void WindowComposer_main()
{
auto info = current->get_display_info();
dbgprintf("Screen is %ux%ux%ubpp\n", info.width, info.height, info.bpp);
FrameBuffer framebuffer((dword*)info.framebuffer, info.width, info.height);
WindowManager::the();
dbgprintf("Entering WindowComposer main loop.\n");
EventLoop::main().exec();
ASSERT_NOT_REACHED();
}