mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:28:13 +00:00

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.
23 lines
578 B
C++
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();
|
|
}
|