mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
WindowServer+LibGUI: Rename WindowType::MenuApplet => Applet
This commit is contained in:
parent
dabfeb6dd8
commit
0069020e6c
13 changed files with 17 additions and 17 deletions
|
@ -84,7 +84,7 @@ ClientConnection::~ClientConnection()
|
|||
auto windows = move(m_windows);
|
||||
for (auto& window : windows) {
|
||||
window.value->detach_client({});
|
||||
if (window.value->type() == WindowType::MenuApplet)
|
||||
if (window.value->type() == WindowType::Applet)
|
||||
AppletManager::the().remove_applet(window.value);
|
||||
}
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ OwnPtr<Messages::WindowServer::CreateWindowResponse> ClientConnection::handle(co
|
|||
window->set_base_size(message.base_size());
|
||||
window->set_resize_aspect_ratio(message.resize_aspect_ratio());
|
||||
window->invalidate(true, true);
|
||||
if (window->type() == WindowType::MenuApplet)
|
||||
if (window->type() == WindowType::Applet)
|
||||
AppletManager::the().add_applet(*window);
|
||||
m_windows.set(window_id, move(window));
|
||||
return make<Messages::WindowServer::CreateWindowResponse>(window_id);
|
||||
|
@ -563,7 +563,7 @@ void ClientConnection::destroy_window(Window& window, Vector<i32>& destroyed_win
|
|||
|
||||
destroyed_window_ids.append(window.window_id());
|
||||
|
||||
if (window.type() == WindowType::MenuApplet)
|
||||
if (window.type() == WindowType::Applet)
|
||||
AppletManager::the().remove_applet(window);
|
||||
|
||||
window.destroy();
|
||||
|
|
|
@ -529,7 +529,7 @@ void Window::invalidate(bool invalidate_frame, bool re_render_frame)
|
|||
|
||||
void Window::invalidate(const Gfx::IntRect& rect, bool with_frame)
|
||||
{
|
||||
if (type() == WindowType::MenuApplet) {
|
||||
if (type() == WindowType::Applet) {
|
||||
AppletManager::the().invalidate_applet(*this, rect);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ public:
|
|||
void clear_dirty_rects();
|
||||
Gfx::DisjointRectSet& dirty_rects() { return m_dirty_rects; }
|
||||
|
||||
// Only used by WindowType::MenuApplet. Perhaps it could be a Window subclass? I don't know.
|
||||
// Only used by WindowType::Applet. Perhaps it could be a Window subclass? I don't know.
|
||||
void set_rect_in_applet_area(const Gfx::IntRect& rect) { m_rect_in_applet_area = rect; }
|
||||
const Gfx::IntRect& rect_in_applet_area() const { return m_rect_in_applet_area; }
|
||||
|
||||
|
|
|
@ -404,7 +404,7 @@ void WindowManager::notify_rect_changed(Window& window, const Gfx::IntRect& old_
|
|||
|
||||
tell_wm_listeners_window_rect_changed(window);
|
||||
|
||||
if (window.type() == WindowType::MenuApplet)
|
||||
if (window.type() == WindowType::Applet)
|
||||
AppletManager::the().relayout();
|
||||
|
||||
MenuManager::the().refresh();
|
||||
|
@ -953,7 +953,7 @@ void WindowManager::process_mouse_event(MouseEvent& event, Window*& hovered_wind
|
|||
|
||||
if (MenuManager::the().has_open_menu()
|
||||
|| hitting_menu_in_window_with_active_menu) {
|
||||
for_each_visible_window_of_type_from_front_to_back(WindowType::MenuApplet, [&](auto& window) {
|
||||
for_each_visible_window_of_type_from_front_to_back(WindowType::Applet, [&](auto& window) {
|
||||
if (!window.rect_in_applet_area().contains(event.position()))
|
||||
return IterationDecision::Continue;
|
||||
hovered_window = &window;
|
||||
|
@ -1158,7 +1158,7 @@ Gfx::IntRect WindowManager::arena_rect_for_type(WindowType type) const
|
|||
case WindowType::WindowSwitcher:
|
||||
case WindowType::Taskbar:
|
||||
case WindowType::Tooltip:
|
||||
case WindowType::MenuApplet:
|
||||
case WindowType::Applet:
|
||||
case WindowType::Notification:
|
||||
return Screen::the().rect();
|
||||
default:
|
||||
|
|
|
@ -35,7 +35,7 @@ enum class WindowType {
|
|||
WindowSwitcher,
|
||||
Taskbar,
|
||||
Tooltip,
|
||||
MenuApplet,
|
||||
Applet,
|
||||
Notification,
|
||||
Desktop,
|
||||
ToolWindow,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue