mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:47:35 +00:00
LibGUI+WindowServer: Rename window "override cursor" to just "cursor"
Let's just say each window has a cursor, there's not really overriding going on.
This commit is contained in:
parent
40fbdd4e9e
commit
b4f307f982
21 changed files with 80 additions and 80 deletions
|
@ -602,36 +602,36 @@ OwnPtr<Messages::WindowServer::SetGlobalCursorTrackingResponse> ClientConnection
|
|||
return make<Messages::WindowServer::SetGlobalCursorTrackingResponse>();
|
||||
}
|
||||
|
||||
OwnPtr<Messages::WindowServer::SetWindowOverrideCursorResponse> ClientConnection::handle(const Messages::WindowServer::SetWindowOverrideCursor& message)
|
||||
OwnPtr<Messages::WindowServer::SetWindowCursorResponse> ClientConnection::handle(const Messages::WindowServer::SetWindowCursor& message)
|
||||
{
|
||||
auto it = m_windows.find(message.window_id());
|
||||
if (it == m_windows.end()) {
|
||||
did_misbehave("SetWindowOverrideCursor: Bad window ID");
|
||||
did_misbehave("SetWindowCursor: Bad window ID");
|
||||
return nullptr;
|
||||
}
|
||||
auto& window = *(*it).value;
|
||||
window.set_override_cursor(Cursor::create((Gfx::StandardCursor)message.cursor_type()));
|
||||
window.set_cursor(Cursor::create((Gfx::StandardCursor)message.cursor_type()));
|
||||
Compositor::the().invalidate_cursor();
|
||||
return make<Messages::WindowServer::SetWindowOverrideCursorResponse>();
|
||||
return make<Messages::WindowServer::SetWindowCursorResponse>();
|
||||
}
|
||||
|
||||
OwnPtr<Messages::WindowServer::SetWindowCustomOverrideCursorResponse> ClientConnection::handle(const Messages::WindowServer::SetWindowCustomOverrideCursor& message)
|
||||
OwnPtr<Messages::WindowServer::SetWindowCustomCursorResponse> ClientConnection::handle(const Messages::WindowServer::SetWindowCustomCursor& message)
|
||||
{
|
||||
auto it = m_windows.find(message.window_id());
|
||||
if (it == m_windows.end()) {
|
||||
did_misbehave("SetWindowCustomOverrideCursor: Bad window ID");
|
||||
did_misbehave("SetWindowCustomCursor: Bad window ID");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto& window = *(*it).value;
|
||||
if (!message.cursor().is_valid()) {
|
||||
did_misbehave("SetWindowCustomOverrideCursor: Bad cursor");
|
||||
did_misbehave("SetWindowCustomCursor: Bad cursor");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
window.set_override_cursor(Cursor::create(*message.cursor().bitmap()));
|
||||
window.set_cursor(Cursor::create(*message.cursor().bitmap()));
|
||||
Compositor::the().invalidate_cursor();
|
||||
return make<Messages::WindowServer::SetWindowCustomOverrideCursorResponse>();
|
||||
return make<Messages::WindowServer::SetWindowCustomCursorResponse>();
|
||||
}
|
||||
|
||||
OwnPtr<Messages::WindowServer::SetWindowHasAlphaChannelResponse> ClientConnection::handle(const Messages::WindowServer::SetWindowHasAlphaChannel& message)
|
||||
|
@ -880,7 +880,7 @@ void ClientConnection::set_unresponsive(bool unresponsive)
|
|||
auto& window = *it.value;
|
||||
window.invalidate();
|
||||
if (unresponsive)
|
||||
window.set_override_cursor(WindowManager::the().wait_cursor());
|
||||
window.set_cursor(WindowManager::the().wait_cursor());
|
||||
}
|
||||
Compositor::the().invalidate_cursor();
|
||||
}
|
||||
|
|
|
@ -127,8 +127,8 @@ private:
|
|||
virtual OwnPtr<Messages::WindowServer::SetWallpaperModeResponse> handle(const Messages::WindowServer::SetWallpaperMode&) override;
|
||||
virtual OwnPtr<Messages::WindowServer::GetWallpaperResponse> handle(const Messages::WindowServer::GetWallpaper&) override;
|
||||
virtual OwnPtr<Messages::WindowServer::SetResolutionResponse> handle(const Messages::WindowServer::SetResolution&) override;
|
||||
virtual OwnPtr<Messages::WindowServer::SetWindowOverrideCursorResponse> handle(const Messages::WindowServer::SetWindowOverrideCursor&) override;
|
||||
virtual OwnPtr<Messages::WindowServer::SetWindowCustomOverrideCursorResponse> handle(const Messages::WindowServer::SetWindowCustomOverrideCursor&) override;
|
||||
virtual OwnPtr<Messages::WindowServer::SetWindowCursorResponse> handle(const Messages::WindowServer::SetWindowCursor&) override;
|
||||
virtual OwnPtr<Messages::WindowServer::SetWindowCustomCursorResponse> handle(const Messages::WindowServer::SetWindowCustomCursor&) override;
|
||||
virtual OwnPtr<Messages::WindowServer::PopupMenuResponse> handle(const Messages::WindowServer::PopupMenu&) override;
|
||||
virtual OwnPtr<Messages::WindowServer::DismissMenuResponse> handle(const Messages::WindowServer::DismissMenu&) override;
|
||||
virtual OwnPtr<Messages::WindowServer::SetWindowIconBitmapResponse> handle(const Messages::WindowServer::SetWindowIconBitmap&) override;
|
||||
|
|
|
@ -218,8 +218,8 @@ public:
|
|||
|
||||
void set_default_icon();
|
||||
|
||||
const Cursor* override_cursor() const { return m_override_cursor.ptr(); }
|
||||
void set_override_cursor(RefPtr<Cursor>&& cursor) { m_override_cursor = move(cursor); }
|
||||
const Cursor* cursor() const { return m_cursor.ptr(); }
|
||||
void set_cursor(RefPtr<Cursor> cursor) { m_cursor = move(cursor); }
|
||||
|
||||
void request_update(const Gfx::IntRect&, bool ignore_occlusion = false);
|
||||
Gfx::DisjointRectSet take_pending_paint_rects() { return move(m_pending_paint_rects); }
|
||||
|
@ -340,7 +340,7 @@ private:
|
|||
Gfx::IntSize m_size_increment;
|
||||
Gfx::IntSize m_base_size;
|
||||
NonnullRefPtr<Gfx::Bitmap> m_icon;
|
||||
RefPtr<Cursor> m_override_cursor;
|
||||
RefPtr<Cursor> m_cursor;
|
||||
WindowFrame m_frame;
|
||||
unsigned m_wm_event_mask { 0 };
|
||||
Gfx::DisjointRectSet m_pending_paint_rects;
|
||||
|
|
|
@ -1304,8 +1304,8 @@ const Cursor& WindowManager::active_cursor() const
|
|||
}
|
||||
}
|
||||
|
||||
if (m_hovered_window && m_hovered_window->override_cursor())
|
||||
return *m_hovered_window->override_cursor();
|
||||
if (m_hovered_window && m_hovered_window->cursor())
|
||||
return *m_hovered_window->cursor();
|
||||
|
||||
return *m_arrow_cursor;
|
||||
}
|
||||
|
|
|
@ -91,8 +91,8 @@ endpoint WindowServer = 2
|
|||
SetWindowIconBitmap(i32 window_id, Gfx::ShareableBitmap icon) => ()
|
||||
|
||||
GetWallpaper() => (String path)
|
||||
SetWindowOverrideCursor(i32 window_id, i32 cursor_type) => ()
|
||||
SetWindowCustomOverrideCursor(i32 window_id, Gfx::ShareableBitmap cursor) => ()
|
||||
SetWindowCursor(i32 window_id, i32 cursor_type) => ()
|
||||
SetWindowCustomCursor(i32 window_id, Gfx::ShareableBitmap cursor) => ()
|
||||
|
||||
StartDrag([UTF8] String text, String data_type, String data, i32 bitmap_id, Gfx::IntSize bitmap_size) => (bool started)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue