| Summary: | Resizing window that opens maximized glitches | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | fanzhuyifan |
| Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | filip.kendes1, nate, serfreeman1337, typingcat, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/298a8ca8c57b2d4b2764a1159a9a88e6698408a8 | Version Fixed/Implemented In: | 6.1 |
| Sentry Crash Report: | |||
| Attachments: | glitches during resize | ||
|
Description
fanzhuyifan
2024-03-12 03:14:40 UTC
Can reproduce Problem seems be a size of 0,0 being set in these lines [0]:
const QRectF &geom_restore = geometryRestore();
if (rules()->checkMaximize(MaximizeRestore) == MaximizeRestore) {
setMoveResizeGeometry(geom_restore);
}
[0] https://invent.kde.org/plasma/kwin/-/blob/master/src/window.cpp?ref_type=heads#L1458
The size of 0x0 is what gets sent to the app, which responds by resizing to its preferred size. It *should* be replaced with that preferred size once the app has actually resized On master, this problem can be solved by adding setMoveResizeGeometry(frameGeometry) after this line: https://invent.kde.org/plasma/kwin/-/blob/8bf1f9203b4016362e1f9f15f1e5b8efddad1b8e/src/xdgshellwindow.cpp#L228 Or by replacing moveResizeGeometry with frameGeometry on this line: https://invent.kde.org/plasma/kwin/-/blob/8bf1f9203b4016362e1f9f15f1e5b8efddad1b8e/src/window.cpp?page=2#L1210 A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5528 Git commit 298a8ca8c57b2d4b2764a1159a9a88e6698408a8 by Vlad Zahorodnii, on behalf of Ser Freeman. Committed on 02/04/2024 at 16:42. Pushed by vladz into branch 'master'. XdgSurfaceWindow: Always update move resize geometry Since interactive move resize logic has changed, there is no need to guard maybeUpdateMoveResizeGeometry anymore. M +2 -5 src/xdgshellwindow.cpp https://invent.kde.org/plasma/kwin/-/commit/298a8ca8c57b2d4b2764a1159a9a88e6698408a8 *** Bug 485839 has been marked as a duplicate of this bug. *** *** Bug 485986 has been marked as a duplicate of this bug. *** |