diff options
Diffstat (limited to 'Servers/WindowServer')
-rw-r--r-- | Servers/WindowServer/WSCompositor.cpp | 2 | ||||
-rw-r--r-- | Servers/WindowServer/WSCursor.h | 2 | ||||
-rw-r--r-- | Servers/WindowServer/WSEvent.h | 2 | ||||
-rw-r--r-- | Servers/WindowServer/WSMenu.cpp | 12 | ||||
-rw-r--r-- | Servers/WindowServer/WSMenuManager.cpp | 2 | ||||
-rw-r--r-- | Servers/WindowServer/WSScreen.h | 2 | ||||
-rw-r--r-- | Servers/WindowServer/WSWindow.h | 2 | ||||
-rw-r--r-- | Servers/WindowServer/WSWindowManager.cpp | 2 | ||||
-rw-r--r-- | Servers/WindowServer/WSWindowManager.h | 2 |
9 files changed, 14 insertions, 14 deletions
diff --git a/Servers/WindowServer/WSCompositor.cpp b/Servers/WindowServer/WSCompositor.cpp index 0b8c45a511..ed9382cbbd 100644 --- a/Servers/WindowServer/WSCompositor.cpp +++ b/Servers/WindowServer/WSCompositor.cpp @@ -144,7 +144,7 @@ void WSCompositor::compose() if (m_wallpaper_mode == WallpaperMode::Simple) { m_back_painter->blit(dirty_rect.location(), *m_wallpaper, dirty_rect); } else if (m_wallpaper_mode == WallpaperMode::Center) { - Point offset { ws.size().width() / 2 - m_wallpaper->size().width() / 2, + Gfx::Point offset { ws.size().width() / 2 - m_wallpaper->size().width() / 2, ws.size().height() / 2 - m_wallpaper->size().height() / 2 }; m_back_painter->blit_offset(dirty_rect.location(), *m_wallpaper, dirty_rect, offset); diff --git a/Servers/WindowServer/WSCursor.h b/Servers/WindowServer/WSCursor.h index bdba0e3a60..4f42de6ffd 100644 --- a/Servers/WindowServer/WSCursor.h +++ b/Servers/WindowServer/WSCursor.h @@ -47,7 +47,7 @@ public: static RefPtr<WSCursor> create(WSStandardCursor); ~WSCursor(); - Point hotspot() const { return m_hotspot; } + Gfx::Point hotspot() const { return m_hotspot; } const Gfx::Bitmap& bitmap() const { return *m_bitmap; } Gfx::Rect rect() const { return m_bitmap->rect(); } diff --git a/Servers/WindowServer/WSEvent.h b/Servers/WindowServer/WSEvent.h index 48b9afc257..78f1c11a2d 100644 --- a/Servers/WindowServer/WSEvent.h +++ b/Servers/WindowServer/WSEvent.h @@ -108,7 +108,7 @@ public: { } - Point position() const { return m_position; } + Gfx::Point position() const { return m_position; } int x() const { return m_position.x(); } int y() const { return m_position.y(); } MouseButton button() const { return m_button; } diff --git a/Servers/WindowServer/WSMenu.cpp b/Servers/WindowServer/WSMenu.cpp index f5531367c9..61a469ea59 100644 --- a/Servers/WindowServer/WSMenu.cpp +++ b/Servers/WindowServer/WSMenu.cpp @@ -125,7 +125,7 @@ WSWindow& WSMenu::ensure_menu_window() { int width = this->content_width(); if (!m_menu_window) { - Point next_item_location(frame_thickness(), frame_thickness()); + Gfx::Point next_item_location(frame_thickness(), frame_thickness()); for (auto& item : m_items) { int height = 0; if (item.type() == WSMenuItem::Text) @@ -249,8 +249,8 @@ void WSMenu::draw() painter.draw_bitmap(submenu_arrow_rect.location(), submenu_arrow_bitmap, text_color); } } else if (item.type() == WSMenuItem::Separator) { - Point p1(item.rect().translated(stripe_rect.width() + 4, 0).x(), item.rect().center().y() - 1); - Point p2(width - 7, item.rect().center().y() - 1); + Gfx::Point p1(item.rect().translated(stripe_rect.width() + 4, 0).x(), item.rect().center().y() - 1); + Gfx::Point p2(width - 7, item.rect().center().y() - 1); painter.draw_line(p1, p2, palette.threed_shadow1()); painter.draw_line(p1.translated(0, 1), p2.translated(0, 1), palette.threed_highlight()); } @@ -305,8 +305,8 @@ void WSMenu::handle_mouse_move_event(const WSMouseEvent& mouse_event) if (hovered_item() && hovered_item()->is_submenu()) { auto item = *hovered_item(); - auto submenu_top_left = item.rect().location() + Point { item.rect().width(), 0 }; - auto submenu_bottom_left = submenu_top_left + Point { 0, item.submenu()->menu_window()->height() }; + auto submenu_top_left = item.rect().location() + Gfx::Point { item.rect().width(), 0 }; + auto submenu_bottom_left = submenu_top_left + Gfx::Point { 0, item.submenu()->menu_window()->height() }; auto safe_hover_triangle = Gfx::Triangle { m_last_position_in_hover, submenu_top_left, submenu_bottom_left }; m_last_position_in_hover = mouse_event.position(); @@ -510,7 +510,7 @@ void WSMenu::popup(const Gfx::Point& position, bool is_submenu) redraw_if_theme_changed(); const int margin = 30; - Point adjusted_pos = position; + Gfx::Point adjusted_pos = position; if (adjusted_pos.x() + window.width() >= WSScreen::the().width() - margin) { adjusted_pos = adjusted_pos.translated(-window.width(), 0); diff --git a/Servers/WindowServer/WSMenuManager.cpp b/Servers/WindowServer/WSMenuManager.cpp index 98aa96e746..110118a4a1 100644 --- a/Servers/WindowServer/WSMenuManager.cpp +++ b/Servers/WindowServer/WSMenuManager.cpp @@ -518,7 +518,7 @@ void WSMenuManager::set_current_menubar(WSMenuBar* menubar) #ifdef DEBUG_MENUS dbg() << "[WM] Current menubar is now " << menubar; #endif - Point next_menu_location { WSMenuManager::menubar_menu_margin() / 2, 0 }; + Gfx::Point next_menu_location { WSMenuManager::menubar_menu_margin() / 2, 0 }; int index = 0; for_each_active_menubar_menu([&](WSMenu& menu) { int text_width = index == 1 ? Gfx::Font::default_bold_font().width(menu.name()) : Gfx::Font::default_font().width(menu.name()); diff --git a/Servers/WindowServer/WSScreen.h b/Servers/WindowServer/WSScreen.h index 918bb9b3c6..28e486e10a 100644 --- a/Servers/WindowServer/WSScreen.h +++ b/Servers/WindowServer/WSScreen.h @@ -52,7 +52,7 @@ public: Size size() const { return { width(), height() }; } Gfx::Rect rect() const { return { 0, 0, width(), height() }; } - Point cursor_location() const { return m_cursor_location; } + Gfx::Point cursor_location() const { return m_cursor_location; } unsigned mouse_button_state() const { return m_mouse_button_state; } void on_receive_mouse_data(const MousePacket&); diff --git a/Servers/WindowServer/WSWindow.h b/Servers/WindowServer/WSWindow.h index a8499be0ca..75976f397e 100644 --- a/Servers/WindowServer/WSWindow.h +++ b/Servers/WindowServer/WSWindow.h @@ -155,7 +155,7 @@ public: void move_to(const Gfx::Point& position) { set_rect({ position, size() }); } void move_to(int x, int y) { move_to({ x, y }); } - Point position() const { return m_rect.location(); } + Gfx::Point position() const { return m_rect.location(); } void set_position(const Gfx::Point& position) { set_rect({ position.x(), position.y(), width(), height() }); } void set_position_without_repaint(const Gfx::Point& position) { set_rect_without_repaint({ position.x(), position.y(), width(), height() }); } diff --git a/Servers/WindowServer/WSWindowManager.cpp b/Servers/WindowServer/WSWindowManager.cpp index 89663bd654..24502b4a7d 100644 --- a/Servers/WindowServer/WSWindowManager.cpp +++ b/Servers/WindowServer/WSWindowManager.cpp @@ -466,7 +466,7 @@ bool WSWindowManager::process_ongoing_window_move(WSMouseEvent& event, WSWindow* m_move_window->set_tiled(WindowTileType::Right); } else if (pixels_moved_from_start > 5 || m_move_window->tiled() == WindowTileType::None) { m_move_window->set_tiled(WindowTileType::None); - Point pos = m_move_window_origin.translated(event.position() - m_move_origin); + Gfx::Point pos = m_move_window_origin.translated(event.position() - m_move_origin); m_move_window->set_position_without_repaint(pos); if (m_move_window->rect().contains(event.position())) hovered_window = m_move_window; diff --git a/Servers/WindowServer/WSWindowManager.h b/Servers/WindowServer/WSWindowManager.h index 74bf3285e2..2704adc9cc 100644 --- a/Servers/WindowServer/WSWindowManager.h +++ b/Servers/WindowServer/WSWindowManager.h @@ -239,7 +239,7 @@ private: struct DoubleClickInfo { struct ClickMetadata { Core::ElapsedTimer clock; - Point last_position; + Gfx::Point last_position; }; ClickMetadata& metadata_for_button(MouseButton); |