Pārlūkot izejas kodu

WindowServer: Tweak width/height of automatic window tile rects

The resulting window rects when snapping to some edges/corners were
a bit lopsided. This patch makes them symmetrical. :^)
Andreas Kling 4 gadi atpakaļ
vecāks
revīzija
a47d576e94
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      Userland/Services/WindowServer/Window.cpp

+ 4 - 4
Userland/Services/WindowServer/Window.cpp

@@ -764,12 +764,12 @@ Gfx::IntRect Window::tiled_rect(WindowTileType tiled) const
     case WindowTileType::Top:
         return Gfx::IntRect(0,
             menu_height,
-            Screen::the().width() - frame_width,
+            Screen::the().width(),
             (max_height - titlebar_height) / 2 - frame_width);
     case WindowTileType::Bottom:
         return Gfx::IntRect(0,
             menu_height + (titlebar_height + max_height) / 2 + frame_width,
-            Screen::the().width() - frame_width,
+            Screen::the().width(),
             (max_height - titlebar_height) / 2 - frame_width);
     case WindowTileType::TopLeft:
         return Gfx::IntRect(0,
@@ -785,12 +785,12 @@ Gfx::IntRect Window::tiled_rect(WindowTileType tiled) const
         return Gfx::IntRect(0,
             menu_height + (titlebar_height + max_height) / 2 + frame_width,
             Screen::the().width() / 2 - frame_width,
-            (max_height - titlebar_height) / 2);
+            (max_height - titlebar_height) / 2 - frame_width);
     case WindowTileType::BottomRight:
         return Gfx::IntRect(Screen::the().width() / 2 + frame_width,
             menu_height + (titlebar_height + max_height) / 2 + frame_width,
             Screen::the().width() / 2 - frame_width,
-            (max_height - titlebar_height) / 2);
+            (max_height - titlebar_height) / 2 - frame_width);
     default:
         VERIFY_NOT_REACHED();
     }