mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
4392da970a
This allows WindowServer to use multiple framebuffer devices and compose the desktop with any arbitrary layout. Currently, it is assumed that it is configured contiguous and non-overlapping, but this should eventually be enforced. To make rendering efficient, each window now also tracks on which screens it needs to be rendered. This way we don't have to iterate all the windows for each screen but instead use the same rendering loop and then only render to the screen (or screens) that the window actually uses.
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "WindowList.h"
|
|
#include <LibGUI/Widget.h>
|
|
#include <LibGUI/Window.h>
|
|
|
|
class TaskbarWindow final : public GUI::Window {
|
|
C_OBJECT(TaskbarWindow);
|
|
|
|
public:
|
|
virtual ~TaskbarWindow() override;
|
|
|
|
static int taskbar_height() { return 27; }
|
|
|
|
private:
|
|
explicit TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu);
|
|
void create_quick_launch_bar();
|
|
void on_screen_rects_change(const Vector<Gfx::IntRect, 4>&, size_t);
|
|
NonnullRefPtr<GUI::Button> create_button(const WindowIdentifier&);
|
|
void add_window_button(::Window&, const WindowIdentifier&);
|
|
void remove_window_button(::Window&, bool);
|
|
void update_window_button(::Window&, bool);
|
|
::Window* find_window_owner(::Window&) const;
|
|
|
|
virtual void wm_event(GUI::WMEvent&) override;
|
|
virtual void screen_rects_change_event(GUI::ScreenRectsChangeEvent&) override;
|
|
|
|
void update_applet_area();
|
|
|
|
NonnullRefPtr<GUI::Menu> m_start_menu;
|
|
RefPtr<GUI::Widget> m_task_button_container;
|
|
RefPtr<Gfx::Bitmap> m_default_icon;
|
|
|
|
Gfx::IntSize m_applet_area_size;
|
|
RefPtr<GUI::Frame> m_applet_area_container;
|
|
RefPtr<GUI::Button> m_start_button;
|
|
};
|