You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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.
1 year ago
..
drm backends/drm: rework how atomic commits are tracked 1 year ago
integration placeSmart: Properly track width and height 1 year ago
libinput Don't use QtTest => use QTest + missing include 1 year ago
libkwineffects Don't use QtTest => use QTest + missing include 1 year ago
CMakeLists.txt
onscreennotificationtest.cpp Add explicit moc includes to sources for moc-covered headers 1 year ago
onscreennotificationtest.h
opengl_context_attribute_builder_test.cpp Don't use QtTest => use QTest + missing include 1 year ago
test_client_machine.cpp Don't use QtTest => use QTest + missing include 1 year ago
test_ftrace.cpp
test_gestures.cpp
test_utils.cpp Don't use QtTest => use QTest + missing include 1 year ago
test_virtual_desktops.cpp Don't use QtTest => use QTest + missing include 1 year ago
test_window_paint_data.cpp Don't use QtTest => use QTest + missing include 1 year ago
test_x11_timestamp_update.cpp
test_xcb_size_hints.cpp Don't use QtTest => use QTest + missing include 1 year ago
test_xcb_window.cpp Don't use QtTest => use QTest + missing include 1 year ago
test_xcb_wrapper.cpp Don't use QtTest => use QTest + missing include 1 year ago
test_xkb.cpp Don't use QtTest => use QTest + missing include 1 year ago
testutils.h
xcb_scaling_mock.cpp