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

WindowServer: Load multiple scaled versions of Bitmaps and Cursors

This enables rendering of mixed-scale screen layouts with e.g. high
resolution cursors and window button icons on high-dpi screens while
using lower resolution bitmaps on regular screens.
This commit is contained in:
Tom 2021-06-18 19:21:30 -06:00 committed by Andreas Kling
parent aa15bf81e4
commit 61af9d882e
15 changed files with 269 additions and 99 deletions

View file

@ -224,8 +224,7 @@ public:
Gfx::IntPoint get_recommended_window_position(Gfx::IntPoint const& desired);
int compositor_icon_scale() const;
void reload_icon_bitmaps_after_scale_change(bool allow_hidpi_icons = true);
void reload_icon_bitmaps_after_scale_change();
void reevaluate_hovered_window(Window* = nullptr);
Window* hovered_window() const { return m_hovered_window.ptr(); }
@ -233,7 +232,7 @@ public:
WindowStack& window_stack() { return m_window_stack; }
private:
NonnullRefPtr<Cursor> get_cursor(String const& name);
RefPtr<Cursor> get_cursor(String const& name);
void process_mouse_event(MouseEvent&);
void process_event_for_doubleclick(Window& window, MouseEvent& event);
@ -257,7 +256,6 @@ private:
void do_move_to_front(Window&, bool, bool);
bool m_allow_hidpi_icons { true };
RefPtr<Cursor> m_hidden_cursor;
RefPtr<Cursor> m_arrow_cursor;
RefPtr<Cursor> m_hand_cursor;