1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

WindowServer+Taskbar: Show applets in taskbar :^)

WindowServer now collects applet windows into an "applet area" which is
really just a window that a WM (window management) client can position
via IPC.

This is rather hackish, and I think we should come up with a better
architecture eventually, but this brings back the missing applets since
the global menu where they used to live is gone.
This commit is contained in:
Andreas Kling 2021-03-30 22:41:14 +02:00
parent 44602ae141
commit 9bbc1c9c93
18 changed files with 145 additions and 40 deletions

View file

@ -153,12 +153,13 @@ void Window::set_title(const String& title)
void Window::set_rect(const Gfx::IntRect& rect)
{
VERIFY(!rect.is_empty());
if (m_rect == rect)
return;
auto old_rect = m_rect;
m_rect = rect;
if (!m_client && (!m_backing_store || old_rect.size() != rect.size())) {
if (rect.is_empty()) {
m_backing_store = nullptr;
} else if (!m_client && (!m_backing_store || old_rect.size() != rect.size())) {
m_backing_store = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, m_rect.size());
}