https://bugs.kde.org/show_bug.cgi?id=406780
Bug ID: 406780 Summary: Smart Window Placement Algorithm ignores window decorations Product: kwin Version: git master Platform: unspecified OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: core Assignee: kwin-bugs-n...@kde.org Reporter: drew...@shaw.ca Target Milestone: --- SUMMARY When opening a new window on an empty desktop the Smart Placement algorithm does not consider the window decorations in it's left most calculations. STEPS TO REPRODUCE 1. Open a new desktop 2. Open any application (eg: konsole, xterm, etc.) 3. Move the window slightly to the right to snap to the screen edge. OBSERVED RESULT The left side of the window decoration will be off screen. EXPECTED RESULT After the window is moved it will snap to the screen edge showing the full window decoration. SOFTWARE/OS VERSIONS Windows: Linux/KDE Plasma: 4.14.3 (Slackware 14.2) PLEASE SEE BELOW (available in About System) KDE Plasma Version: 4.14.3 KDE Frameworks Version: 4.14.3 Qt Version: 4.8.7 ADDITIONAL INFORMATION I realize this is an older release of KDE, but I have pulled the current release of placement.cpp from the GIT repository and compared to the source code Slackware used to build this package. The Placement::placeSmart function is almost identical in both versions. The line I believe needs review is around line 220: int x = maxRect.left(), y = maxRect.top(); and then a few lines later: if (overlap == none) { x_optimal = x; y_optimal = y; break; } if (first_pass) { first_pass = false; min_overlap = overlap; } //CT save the best position and the minimum overlap up to now else if (overlap >= none && overlap < min_overlap) { min_overlap = overlap; x_optimal = x; y_optimal = y; } x_optimal and y_optimal are being used to display the window without considering the width of the Window decorations. Additional windows do not overlap, which the algorithm tests for and adjusts to make sure there isn't. This only affects windows placed on the left hand edge of the screen. -- You are receiving this mail because: You are watching all bug changes.