1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 05:54:58 +00:00

WindowServer: Don't show tile overlay for fixed aspect ratio windows

Windows with fixed aspect ratio cannot be tiled so the tile overlay
shouldn't be shown.
This commit is contained in:
ronak69 2023-10-13 17:51:48 +00:00 committed by Sam Atkins
parent 8d16c7c9b9
commit 83028518a0

View file

@ -860,9 +860,10 @@ bool WindowManager::process_ongoing_window_move(MouseEvent& event)
m_move_window_origin = m_move_window->position();
}
} else {
bool has_fixed_aspect_ratio = m_move_window->resize_aspect_ratio().has_value();
bool is_resizable = m_move_window->is_resizable();
auto tile_window = m_system_effects.tile_window();
bool allow_tile = is_resizable && tile_window != TileWindow::Never;
bool allow_tile = !has_fixed_aspect_ratio && is_resizable && tile_window != TileWindow::Never;
auto pixels_moved_from_start = event.position().pixels_moved(m_move_origin);
auto apply_window_tile = [&](WindowTileType tile_type) {