mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:28:11 +00:00
WindowServer: Add "Move" action to window menus
This can be used to initiate a window move. It's only enabled while the window is normal (not minimized, maximized or fullscreen.)
This commit is contained in:
parent
2bc3cc4cab
commit
634e652b6c
4 changed files with 21 additions and 3 deletions
|
@ -477,7 +477,7 @@ bool WindowManager::pick_new_active_window(Window* previous_active)
|
|||
return new_window_picked;
|
||||
}
|
||||
|
||||
void WindowManager::start_window_move(Window& window, const MouseEvent& event)
|
||||
void WindowManager::start_window_move(Window& window, const Gfx::IntPoint& origin)
|
||||
{
|
||||
MenuManager::the().close_everyone();
|
||||
|
||||
|
@ -486,11 +486,16 @@ void WindowManager::start_window_move(Window& window, const MouseEvent& event)
|
|||
move_to_front_and_make_active(window);
|
||||
m_move_window = window;
|
||||
m_move_window->set_default_positioned(false);
|
||||
m_move_origin = event.position();
|
||||
m_move_origin = origin;
|
||||
m_move_window_origin = window.position();
|
||||
window.invalidate(true, true);
|
||||
}
|
||||
|
||||
void WindowManager::start_window_move(Window& window, const MouseEvent& event)
|
||||
{
|
||||
start_window_move(window, event.position());
|
||||
}
|
||||
|
||||
void WindowManager::start_window_resize(Window& window, const Gfx::IntPoint& position, MouseButton button)
|
||||
{
|
||||
MenuManager::the().close_everyone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue