diff options
author | Tom <tomut@yahoo.com> | 2021-06-13 06:16:06 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-20 14:57:26 +0200 |
commit | 4392da970ac0fc433530579b13030a41ff4a8f59 (patch) | |
tree | cfae0a3ddc1b6c4f2db9f4cf7984eba761f3b5f0 /Userland/Libraries/LibGUI/Event.h | |
parent | 499c33ae0cf8892dfdf851c178b2b9f7a8bfb79f (diff) | |
download | serenity-4392da970ac0fc433530579b13030a41ff4a8f59.zip |
WindowServer: Add initial support for rendering on multiple screens
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.
Diffstat (limited to 'Userland/Libraries/LibGUI/Event.h')
-rw-r--r-- | Userland/Libraries/LibGUI/Event.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Userland/Libraries/LibGUI/Event.h b/Userland/Libraries/LibGUI/Event.h index 34b8b65759..edbf4ad2c9 100644 --- a/Userland/Libraries/LibGUI/Event.h +++ b/Userland/Libraries/LibGUI/Event.h @@ -52,7 +52,7 @@ public: DragMove, Drop, ThemeChange, - ScreenRectChange, + ScreenRectsChange, ActionEnter, ActionLeave, @@ -392,18 +392,21 @@ public: } }; -class ScreenRectChangeEvent final : public Event { +class ScreenRectsChangeEvent final : public Event { public: - explicit ScreenRectChangeEvent(const Gfx::IntRect& rect) - : Event(Type::ScreenRectChange) - , m_rect(rect) + explicit ScreenRectsChangeEvent(const Vector<Gfx::IntRect, 4>& rects, size_t main_screen_index) + : Event(Type::ScreenRectsChange) + , m_rects(rects) + , m_main_screen_index(main_screen_index) { } - const Gfx::IntRect& rect() const { return m_rect; } + const Vector<Gfx::IntRect, 4>& rects() const { return m_rects; } + size_t main_screen_index() const { return m_main_screen_index; } private: - Gfx::IntRect m_rect; + Vector<Gfx::IntRect, 4> m_rects; + size_t m_main_screen_index; }; class FocusEvent final : public Event { |