diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-28 10:24:58 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-28 10:24:58 +0200 |
commit | d4892b3fdc36546545058a3e3c5a10d61be07c8e (patch) | |
tree | 064f779963495bb513af51e8d14b2da3b9e17344 /Libraries/LibGUI | |
parent | 841b2e5d1367b1b5638d13dbed155ec53914e015 (diff) | |
download | serenity-d4892b3fdc36546545058a3e3c5a10d61be07c8e.zip |
WindowServer+LibGUI: Remove old "icon path" way of doing things.
Now that we can set icons directly "by bitmap", there's no need for passing
around the icon paths anymore, so get rid of all the IPC and API related
to that. :^)
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r-- | Libraries/LibGUI/GEvent.h | 15 | ||||
-rw-r--r-- | Libraries/LibGUI/GEventLoop.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibGUI/GWindow.cpp | 16 | ||||
-rw-r--r-- | Libraries/LibGUI/GWindow.h | 4 |
4 files changed, 0 insertions, 37 deletions
diff --git a/Libraries/LibGUI/GEvent.h b/Libraries/LibGUI/GEvent.h index ade04d08a2..d58e4a8043 100644 --- a/Libraries/LibGUI/GEvent.h +++ b/Libraries/LibGUI/GEvent.h @@ -39,7 +39,6 @@ public: WM_WindowRemoved, WM_WindowStateChanged, WM_WindowRectChanged, - WM_WindowIconChanged, WM_WindowIconBitmapChanged, __End_WM_Events, }; @@ -120,20 +119,6 @@ private: Rect m_rect; }; -class GWMWindowIconChangedEvent : public GWMEvent { -public: - GWMWindowIconChangedEvent(int client_id, int window_id, const StringView& icon_path) - : GWMEvent(GEvent::Type::WM_WindowIconChanged, client_id, window_id) - , m_icon_path(icon_path) - { - } - - String icon_path() const { return m_icon_path; } - -private: - String m_icon_path; -}; - class GWMWindowIconBitmapChangedEvent : public GWMEvent { public: GWMWindowIconBitmapChangedEvent(int client_id, int window_id, int icon_buffer_id, const Size& icon_size) diff --git a/Libraries/LibGUI/GEventLoop.cpp b/Libraries/LibGUI/GEventLoop.cpp index 458f1ec708..a27e8ef5b4 100644 --- a/Libraries/LibGUI/GEventLoop.cpp +++ b/Libraries/LibGUI/GEventLoop.cpp @@ -192,8 +192,6 @@ void GWindowServerConnection::handle_wm_event(const WSAPI_ServerMessage& event, CEventLoop::current().post_event(window, make<GWMWindowStateChangedEvent>(event.wm.client_id, event.wm.window_id, String(event.text, event.text_length), event.wm.rect, event.wm.is_active, (GWindowType)event.wm.window_type, event.wm.is_minimized)); else if (event.type == WSAPI_ServerMessage::WM_WindowRectChanged) CEventLoop::current().post_event(window, make<GWMWindowRectChangedEvent>(event.wm.client_id, event.wm.window_id, event.wm.rect)); - else if (event.type == WSAPI_ServerMessage::WM_WindowIconChanged) - CEventLoop::current().post_event(window, make<GWMWindowIconChangedEvent>(event.wm.client_id, event.wm.window_id, String(event.text, event.text_length))); else if (event.type == WSAPI_ServerMessage::WM_WindowIconBitmapChanged) CEventLoop::current().post_event(window, make<GWMWindowIconBitmapChangedEvent>(event.wm.client_id, event.wm.window_id, event.wm.icon_buffer_id, event.wm.icon_size)); else if (event.type == WSAPI_ServerMessage::WM_WindowRemoved) diff --git a/Libraries/LibGUI/GWindow.cpp b/Libraries/LibGUI/GWindow.cpp index 1c36ea90dc..699168fb97 100644 --- a/Libraries/LibGUI/GWindow.cpp +++ b/Libraries/LibGUI/GWindow.cpp @@ -643,22 +643,6 @@ void GWindow::set_icon(const GraphicsBitmap* icon) GWindowServerConnection::the().post_message_to_server(message); } -void GWindow::set_icon_path(const StringView& path) -{ - if (m_icon_path == path) - return; - m_icon_path = path; - if (!m_window_id) - return; - WSAPI_ClientMessage message; - message.type = WSAPI_ClientMessage::Type::SetWindowIcon; - message.window_id = m_window_id; - ASSERT(path.length() < (int)sizeof(message.text)); - strcpy(message.text, String(path).characters()); - message.text_length = path.length(); - GWindowServerConnection::the().post_message_to_server(message); -} - void GWindow::start_wm_resize() { WSAPI_ClientMessage message; diff --git a/Libraries/LibGUI/GWindow.h b/Libraries/LibGUI/GWindow.h index 827e664011..56f4a5fa74 100644 --- a/Libraries/LibGUI/GWindow.h +++ b/Libraries/LibGUI/GWindow.h @@ -119,9 +119,6 @@ public: void set_override_cursor(GStandardCursor); - String icon_path() const { return m_icon_path; } - void set_icon_path(const StringView&); - void set_icon(const GraphicsBitmap*); const GraphicsBitmap* icon() const { return m_icon.ptr(); } @@ -154,7 +151,6 @@ private: WeakPtr<GWidget> m_hovered_widget; Rect m_rect_when_windowless; String m_title_when_windowless; - String m_icon_path; Vector<Rect, 32> m_pending_paint_event_rects; Size m_size_increment; Size m_base_size; |