kwin/autotests/integration
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
..
data Drop support for _KDE_NET_WM_TEMPORARY_RULES 2023-02-02 15:34:24 +00:00
effects Install KWaylandServer headers 2023-07-04 08:22:43 +00:00
fakes kcm/decoration: Allow specifying the kcm separately from the decoration 2023-06-13 12:20:21 +02:00
helper build: Add -Wno-unused-parameter compiler option 2022-10-31 15:50:37 +00:00
protocols
scripting Install KWaylandServer headers 2023-07-04 08:22:43 +00:00
activation_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
activities_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
CMakeLists.txt wayland: Implement cursor-shape-v1 2023-07-12 11:22:11 +03:00
dbus_interface_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
debug_console_test.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
decoration_input_test.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
desktop_window_x11_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
dont_crash_aurorae_destroy_deco.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
dont_crash_cancel_animation.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
dont_crash_empty_deco.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
dont_crash_glxgears.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
dont_crash_reinitialize_compositor.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
dont_crash_useractions_menu.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
fractional_scaling_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
generic_scene_opengl_test.cpp Add explicit moc includes to sources for moc-covered headers 2023-07-15 08:40:49 +00:00
generic_scene_opengl_test.h screencasting: Add an autotest 2023-03-31 00:19:59 +02:00
globalshortcuts_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
idle_inhibition_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
input_stacking_order.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
inputmethod_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
internal_window.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
keyboard_layout_test.cpp Drop InputConfig 2023-06-21 10:48:50 +00:00
keymap_creation_failure_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
kwin_wayland_test.cpp Add explicit moc includes to sources for moc-covered headers 2023-07-15 08:40:49 +00:00
kwin_wayland_test.h wayland: Implement cursor-shape-v1 2023-07-12 11:22:11 +03:00
kwinbindings_test.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
layershellv1window_test.cpp screen edge: Emit cleanup signals if needed on teardown 2023-05-25 09:59:00 +00:00
lockscreen.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
maximize_test.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
modifier_only_shortcut_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
move_resize_window_test.cpp Move window hiding logic to Window 2023-06-06 13:58:44 +00:00
no_global_shortcuts_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
outputchanges_test.cpp outputconfigurationstore: don't handle laptop lid closing yet 2023-06-21 11:05:42 +02:00
placement_test.cpp placeSmart: Properly track width and height 2023-08-07 07:14:18 +00:00
plasma_surface_test.cpp autotests: Move plasmashell bits from testMoveResizeWindow to testPlasmaSurface 2023-05-23 18:00:50 +00:00
plasmawindow_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
platformcursor.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
pointer_constraints_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
pointer_input.cpp wayland: Implement cursor-shape-v1 2023-07-12 11:22:11 +03:00
quick_tiling_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
scene_opengl_es_test.cpp
scene_opengl_test.cpp
screen_changes_test.cpp autotests: directly call setVirtualOutputs 2023-05-09 15:18:33 +00:00
screencasting_test.cpp autotests: Skip ScreencastingTest::testOutputCasting when running in ci 2023-06-14 11:01:03 +00:00
screenedges_test.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
screens_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
shade_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
showing_desktop_test.cpp autotests: Port testShowingDesktop to layer-shell 2023-05-23 18:00:50 +00:00
stacking_order_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
struts_test.cpp wayland: Drop strut support in XdgToplevelWindow 2023-05-23 13:02:14 +00:00
tabbox_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
test_helpers.cpp wayland: Implement cursor-shape-v1 2023-07-12 11:22:11 +03:00
test_virtualkeyboard_dbus.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
tiles_test.cpp autotests: Avoid binding plasmashell global in tests that don't use it 2023-05-23 18:00:50 +00:00
touch_input_test.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
transient_placement.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
virtual_desktop_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
window_rules_test.cpp Move window hiding logic to Window 2023-06-06 13:58:44 +00:00
window_selection_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
x11_window_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
xdgshellwindow_rules_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
xdgshellwindow_test.cpp Move window hiding logic to Window 2023-06-06 13:58:44 +00:00
xwayland_input_test.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
xwayland_selections_test.cpp Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
xwaylandserver_crash_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00
xwaylandserver_restart_test.cpp autotests: Remove unused outputbackend.h includes 2023-05-23 11:42:32 +03:00