mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 19:19:44 +03:00
WindowServer: Make some WindowManager member functions const
This commit is contained in:
parent
1048283186
commit
d3eccf0409
Notes:
sideshowbarker
2024-07-19 06:31:17 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/d3eccf04090 Pull-request: https://github.com/SerenityOS/serenity/pull/2282
@ -99,7 +99,7 @@ public:
|
||||
|
||||
Gfx::Rect maximized_window_rect(const Window&) const;
|
||||
|
||||
ClientConnection* dnd_client() { return m_dnd_client.ptr(); }
|
||||
const ClientConnection* dnd_client() const { return m_dnd_client.ptr(); }
|
||||
const String& dnd_text() const { return m_dnd_text; }
|
||||
const String& dnd_data_type() const { return m_dnd_data_type; }
|
||||
const String& dnd_data() const { return m_dnd_data; }
|
||||
@ -109,11 +109,11 @@ public:
|
||||
void start_dnd_drag(ClientConnection&, const String& text, Gfx::Bitmap*, const String& data_type, const String& data);
|
||||
void end_dnd_drag();
|
||||
|
||||
Window* active_window() { return m_active_window.ptr(); }
|
||||
const Window* active_window() const { return m_active_window.ptr(); }
|
||||
const ClientConnection* active_client() const;
|
||||
bool active_window_is_modal() const { return m_active_window && m_active_window->is_modal(); }
|
||||
|
||||
Window* highlight_window() { return m_highlight_window.ptr(); }
|
||||
const Window* highlight_window() const { return m_highlight_window.ptr(); }
|
||||
void set_highlight_window(Window*);
|
||||
|
||||
void move_to_front_and_make_active(Window&);
|
||||
@ -148,7 +148,7 @@ public:
|
||||
void set_active_window(Window*);
|
||||
void set_hovered_button(Button*);
|
||||
|
||||
Button* cursor_tracking_button() { return m_cursor_tracking_button.ptr(); }
|
||||
const Button* cursor_tracking_button() const { return m_cursor_tracking_button.ptr(); }
|
||||
void set_cursor_tracking_button(Button*);
|
||||
|
||||
void set_resize_candidate(Window&, ResizeDirection);
|
||||
|
@ -212,7 +212,7 @@ void WindowSwitcher::draw()
|
||||
void WindowSwitcher::refresh()
|
||||
{
|
||||
auto& wm = WindowManager::the();
|
||||
Window* selected_window = nullptr;
|
||||
const Window* selected_window = nullptr;
|
||||
if (m_selected_index > 0 && m_windows[m_selected_index])
|
||||
selected_window = m_windows[m_selected_index].ptr();
|
||||
if (!selected_window)
|
||||
|
Loading…
Reference in New Issue
Block a user