diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-01 23:19:00 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-02 01:29:55 +0200 |
commit | bb7eb3e1040b619cbbb606e9423468d5d851a5b0 (patch) | |
tree | d8ef27f89ce2a339c261b23b3e9da8f6aaa878ec | |
parent | 2ac1fbef4f26acdf17b1f6b69657f4804cff8753 (diff) | |
download | serenity-bb7eb3e1040b619cbbb606e9423468d5d851a5b0.zip |
WindowServer+LibGUI: Remove unused Window::show_titlebar() flag
Nobody was using this flag, so let's stop maintaining it. It's easy to
add it back if we ever want the behavior.
-rw-r--r-- | Libraries/LibGUI/Window.cpp | 1 | ||||
-rw-r--r-- | Libraries/LibGUI/Window.h | 4 | ||||
-rw-r--r-- | Servers/WindowServer/ClientConnection.cpp | 1 | ||||
-rw-r--r-- | Servers/WindowServer/Window.h | 4 | ||||
-rw-r--r-- | Servers/WindowServer/WindowFrame.cpp | 8 | ||||
-rw-r--r-- | Servers/WindowServer/WindowServer.ipc | 1 |
6 files changed, 2 insertions, 17 deletions
diff --git a/Libraries/LibGUI/Window.cpp b/Libraries/LibGUI/Window.cpp index 60d80d938e..ca659bc073 100644 --- a/Libraries/LibGUI/Window.cpp +++ b/Libraries/LibGUI/Window.cpp @@ -100,7 +100,6 @@ void Window::show() m_minimizable, m_resizable, m_fullscreen, - m_show_titlebar, m_opacity_when_windowless, m_base_size, m_size_increment, diff --git a/Libraries/LibGUI/Window.h b/Libraries/LibGUI/Window.h index 20f20eac71..c900e58425 100644 --- a/Libraries/LibGUI/Window.h +++ b/Libraries/LibGUI/Window.h @@ -78,9 +78,6 @@ public: String title() const; void set_title(const StringView&); - bool show_titlebar() const { return m_show_titlebar; }; - void set_show_titlebar(bool show) { m_show_titlebar = show; }; - Color background_color() const { return m_background_color; } void set_background_color(Color color) { m_background_color = color; } @@ -222,7 +219,6 @@ private: bool m_resizable { true }; bool m_minimizable { true }; bool m_fullscreen { false }; - bool m_show_titlebar { true }; bool m_layout_pending { false }; bool m_visible_for_timer_purposes { true }; bool m_visible { false }; diff --git a/Servers/WindowServer/ClientConnection.cpp b/Servers/WindowServer/ClientConnection.cpp index 6b79c33bb5..0be46dad83 100644 --- a/Servers/WindowServer/ClientConnection.cpp +++ b/Servers/WindowServer/ClientConnection.cpp @@ -485,7 +485,6 @@ OwnPtr<Messages::WindowServer::CreateWindowResponse> ClientConnection::handle(co window->set_rect(WindowManager::the().desktop_rect()); window->recalculate_rect(); } - window->set_show_titlebar(message.show_titlebar()); window->set_opacity(message.opacity()); window->set_size_increment(message.size_increment()); window->set_base_size(message.base_size()); diff --git a/Servers/WindowServer/Window.h b/Servers/WindowServer/Window.h index b22c15410f..b6eb46eb93 100644 --- a/Servers/WindowServer/Window.h +++ b/Servers/WindowServer/Window.h @@ -97,9 +97,6 @@ public: bool is_occluded() const { return m_occluded; } void set_occluded(bool); - bool show_titlebar() const { return m_show_titlebar; } - void set_show_titlebar(bool show) { m_show_titlebar = show; } - bool is_movable() const { return m_type == WindowType::Normal; @@ -262,7 +259,6 @@ private: WindowTileType m_tiled { WindowTileType::None }; Gfx::Rect m_untiled_rect; bool m_occluded { false }; - bool m_show_titlebar { true }; RefPtr<Gfx::Bitmap> m_backing_store; RefPtr<Gfx::Bitmap> m_last_backing_store; int m_window_id { -1 }; diff --git a/Servers/WindowServer/WindowFrame.cpp b/Servers/WindowServer/WindowFrame.cpp index 5face69eff..1106622e24 100644 --- a/Servers/WindowServer/WindowFrame.cpp +++ b/Servers/WindowServer/WindowFrame.cpp @@ -220,9 +220,6 @@ void WindowFrame::paint_normal_frame(Gfx::Painter& painter) Gfx::StylePainter::paint_window_frame(painter, outer_rect, palette); - if (!window.show_titlebar()) - return; - auto titlebar_rect = title_bar_rect(); auto titlebar_icon_rect = title_bar_icon_rect(); auto titlebar_inner_rect = title_bar_text_rect(); @@ -278,15 +275,14 @@ void WindowFrame::paint(Gfx::Painter& painter) static Gfx::Rect frame_rect_for_window(Window& window, const Gfx::Rect& rect) { auto type = window.type(); - auto offset = !window.show_titlebar() ? (window_titlebar_height + 1) : 0; switch (type) { case WindowType::Normal: return { rect.x() - 4, - rect.y() - window_titlebar_height - 6 + offset, + rect.y() - window_titlebar_height - 6, rect.width() + 8, - rect.height() + 10 + window_titlebar_height - offset + rect.height() + 10 + window_titlebar_height }; case WindowType::Notification: return { diff --git a/Servers/WindowServer/WindowServer.ipc b/Servers/WindowServer/WindowServer.ipc index 34d9e8db6c..4ae930326d 100644 --- a/Servers/WindowServer/WindowServer.ipc +++ b/Servers/WindowServer/WindowServer.ipc @@ -36,7 +36,6 @@ endpoint WindowServer = 2 bool minimizable, bool resizable, bool fullscreen, - bool show_titlebar, float opacity, Gfx::Size base_size, Gfx::Size size_increment, |