summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Services/WindowServer/WindowManager.h8
-rw-r--r--Services/WindowServer/WindowSwitcher.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/Services/WindowServer/WindowManager.h b/Services/WindowServer/WindowManager.h
index 7a0b03a3f3..f498c47ae5 100644
--- a/Services/WindowServer/WindowManager.h
+++ b/Services/WindowServer/WindowManager.h
@@ -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);
diff --git a/Services/WindowServer/WindowSwitcher.cpp b/Services/WindowServer/WindowSwitcher.cpp
index fbf53184da..0bd1841171 100644
--- a/Services/WindowServer/WindowSwitcher.cpp
+++ b/Services/WindowServer/WindowSwitcher.cpp
@@ -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)