mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
WindowServer: Fix calculating tile rect on secondary screens
The screen rectangle's origin is only {0, 0} on the main screen, so we need to move the tile rectangle relative to its location.
This commit is contained in:
parent
6f9c5b71fd
commit
fa7f9b0f35
1 changed files with 2 additions and 2 deletions
|
@ -1987,7 +1987,7 @@ Gfx::IntRect WindowManager::tiled_window_rect(Window const& window, WindowTileTy
|
||||||
|| tile_type == WindowTileType::TopRight
|
|| tile_type == WindowTileType::TopRight
|
||||||
|| tile_type == WindowTileType::BottomRight) {
|
|| tile_type == WindowTileType::BottomRight) {
|
||||||
rect.set_width(rect.width() / 2);
|
rect.set_width(rect.width() / 2);
|
||||||
rect.set_x(rect.width());
|
rect.set_x(rect.x() + rect.width());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tile_type == WindowTileType::Top
|
if (tile_type == WindowTileType::Top
|
||||||
|
@ -2001,7 +2001,7 @@ Gfx::IntRect WindowManager::tiled_window_rect(Window const& window, WindowTileTy
|
||||||
|| tile_type == WindowTileType::BottomRight) {
|
|| tile_type == WindowTileType::BottomRight) {
|
||||||
auto half_screen_remainder = rect.height() % 2;
|
auto half_screen_remainder = rect.height() % 2;
|
||||||
rect.set_height(rect.height() / 2 + half_screen_remainder);
|
rect.set_height(rect.height() / 2 + half_screen_remainder);
|
||||||
rect.set_y(rect.height() - half_screen_remainder);
|
rect.set_y(rect.y() + rect.height() - half_screen_remainder);
|
||||||
}
|
}
|
||||||
|
|
||||||
Gfx::IntRect window_rect = window.rect();
|
Gfx::IntRect window_rect = window.rect();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue