diff options
Diffstat (limited to 'Userland/Services/WindowServer/Screen.h')
-rw-r--r-- | Userland/Services/WindowServer/Screen.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Services/WindowServer/Screen.h b/Userland/Services/WindowServer/Screen.h index 64cce345bf..3d8b7bc50d 100644 --- a/Userland/Services/WindowServer/Screen.h +++ b/Userland/Services/WindowServer/Screen.h @@ -98,22 +98,22 @@ public: { if (index >= s_screens.size()) return nullptr; - return &s_screens[index]; + return s_screens[index]; } static Vector<Gfx::IntRect, 4> rects() { Vector<Gfx::IntRect, 4> rects; for (auto& screen : s_screens) - rects.append(screen.rect()); + rects.append(screen->rect()); return rects; } static Screen* find_by_location(Gfx::IntPoint point) { for (auto& screen : s_screens) { - if (screen.rect().contains(point)) - return &screen; + if (screen->rect().contains(point)) + return screen; } return nullptr; } @@ -127,7 +127,7 @@ public: static IterationDecision for_each(F f) { for (auto& screen : s_screens) { - IterationDecision decision = f(screen); + IterationDecision decision = f(*screen); if (decision != IterationDecision::Continue) return decision; } @@ -187,7 +187,7 @@ private: static void update_indices() { for (size_t i = 0; i < s_screens.size(); i++) - s_screens[i].m_index = i; + s_screens[i]->m_index = i; } static void update_bounding_rect(); static void update_scale_factors_in_use(); @@ -199,7 +199,7 @@ private: ScreenLayout::Screen& screen_layout_info() { return s_layout.screens[m_index]; } ScreenLayout::Screen const& screen_layout_info() const { return s_layout.screens[m_index]; } - static NonnullRefPtrVector<Screen, default_screen_count> s_screens; + static Vector<NonnullRefPtr<Screen>, default_screen_count> s_screens; static Screen* s_main_screen; static Gfx::IntRect s_bounding_screens_rect; static ScreenLayout s_layout; |