mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
57ff293a51
This patch adds a simple GMessageBox that can run in a nested event loop. Here's how you use it: GMessageBox box("Message text here", "Message window title"); int result = box.exec(); The next step is to make the WindowServer respect the modality flag of these windows and prevent interaction with other windows in the same process until the modal window has been closed.
16 lines
318 B
C++
16 lines
318 B
C++
#include <LibGUI/GNotifier.h>
|
|
#include <LibGUI/GEventLoop.h>
|
|
|
|
GNotifier::GNotifier(int fd, unsigned event_mask)
|
|
: m_fd(fd)
|
|
, m_event_mask(event_mask)
|
|
{
|
|
GEventLoop::register_notifier(Badge<GNotifier>(), *this);
|
|
}
|
|
|
|
GNotifier::~GNotifier()
|
|
{
|
|
GEventLoop::unregister_notifier(Badge<GNotifier>(), *this);
|
|
}
|
|
|