kwin/autotests
Antonio Russo 5502ce9a9c placeSmart: Properly track width and height
`Placements::placeSmart` searches for an optimal position for windows, attempting to minimize overlap.  The core of this algorithm tracks the
client's height and width in `ch` and `cw`, which have been adjusted by -1. This simplifies logic determining the bottom and right points of a
window when you are starting at the top and left points.

However, this decision requires adjusting that number by +1 when doing the opposite: determining the top and left points when you start with
the bottom and right points.

placeSmart cycles through window locations, searching for acceptable nooks and crannies to fit a window in, nicely.  It begins by checking
for places to put the top left corner of the window which abut another constraint.  If that fails, it then tries to place the bottom right
abutting a constraining feature.

After finding a suitable bottom (or right) location, the top (or left) location must be determined, requiring the -1 adjustment to be undone.

This patch adds that +1 back in.

# The bug it solves

This error can be seen by opening a bunch of windows that are placed using the "Minimal Overlapping" rule.  The open space on the screen will be tiled from left to right, and then top to bottom in the windows.  Once no more windows can be placed like that, the next window will be placed at the extreme bottom-right corner.  However, it will be one pixel too low and one pixel too far to the right---if you try to move the window, it will "snap" to the correct spot.

This single pixel may seem minor or even irrelevant, but when you use the "Present Windows" desktop effect on a multiple-monitor setup, this one pixel will cause the window to show up on both monitors.
2023-08-07 07:14:18 +00:00
..
drm backends/drm: rework how atomic commits are tracked 2023-07-27 12:30:19 +02:00
integration placeSmart: Properly track width and height 2023-08-07 07:14:18 +00:00
libinput Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
libkwineffects Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
CMakeLists.txt Install KWaylandServer headers 2023-07-04 08:22:43 +00:00
onscreennotificationtest.cpp Add explicit moc includes to sources for moc-covered headers 2023-07-15 08:40:49 +00:00
onscreennotificationtest.h
opengl_context_attribute_builder_test.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
test_client_machine.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
test_ftrace.cpp
test_gestures.cpp
test_utils.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
test_virtual_desktops.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
test_window_paint_data.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
test_x11_timestamp_update.cpp libkwineffects: Stop including xcb/xcb.h everywhere 2023-05-15 18:59:46 +00:00
test_xcb_size_hints.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
test_xcb_window.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
test_xcb_wrapper.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
test_xkb.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
testutils.h libkwineffects: Stop including xcb/xcb.h everywhere 2023-05-15 18:59:46 +00:00
xcb_scaling_mock.cpp