mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:58:11 +00:00
WindowServer+LibGUI: Shrink window edge resize hot-spots
The hot-spots for resizing a window by dragging its corner are now limited to a small area around the actual corner instead of an area with 1/3rd the length or width of the window. The hot-spots to resize a window while holding a modifier key and the right mouse button are unchanged.
This commit is contained in:
parent
eb9db167da
commit
8202beeb2b
15 changed files with 107 additions and 62 deletions
|
@ -86,7 +86,7 @@ void WMConnectionFromClient::popup_window_menu(i32 client_id, i32 window_id, Gfx
|
|||
}
|
||||
}
|
||||
|
||||
void WMConnectionFromClient::start_window_resize(i32 client_id, i32 window_id)
|
||||
void WMConnectionFromClient::start_window_resize(i32 client_id, i32 window_id, i32 resize_direction)
|
||||
{
|
||||
auto* client = WindowServer::ConnectionFromClient::from_client_id(client_id);
|
||||
if (!client) {
|
||||
|
@ -101,7 +101,7 @@ void WMConnectionFromClient::start_window_resize(i32 client_id, i32 window_id)
|
|||
auto& window = *(*it).value;
|
||||
// FIXME: We are cheating a bit here by using the current cursor location and hard-coding the left button.
|
||||
// Maybe the client should be allowed to specify what initiated this request?
|
||||
WindowManager::the().start_window_resize(window, ScreenInput::the().cursor_location(), MouseButton::Primary);
|
||||
WindowManager::the().start_window_resize(window, ScreenInput::the().cursor_location(), MouseButton::Primary, (ResizeDirection)resize_direction);
|
||||
}
|
||||
|
||||
void WMConnectionFromClient::set_window_minimized(i32 client_id, i32 window_id, bool minimized)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue