Bug 370345 - Resizing Qt based apps with grab to window border pushes window short distance away from cursor
Summary: Resizing Qt based apps with grab to window border pushes window short distanc...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D3414
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-09 15:40 UTC by Roman Gilg
Modified: 2016-11-18 14:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.4
Sentry Crash Report:
mgraesslin: Wayland+
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Gilg 2016-10-09 15:40:44 UTC
Grab a Qt based app's window border in order to resize it. As soon as you start dragging, the window will snap back further away from the cursor. Because of this you can't for example strecht a window completely up to the top of the screen.

Tests:
Happens with:
- Konsole, Dolphin
- QupZilla
Doesn't:
- Chrome
- Firefox

Reproducible: Always
Comment 1 Martin Flöser 2016-10-10 05:48:11 UTC
I never noticed, good spot!
Comment 2 Kai Uwe Broulik 2016-10-30 10:38:40 UTC
It seems it doesn't take into account the window decoration.

Even when I start resizing a window just horizontally, as soon as the resize operation starts, the window's height reduces roughly by the height of the window decoration.

I can reproduce this with Qt applications running as Wayland clients but not when running the very same application with XCB platform. (This is not implying that this is a Qt-only problem, I just can't think of a non-Qt application I could run on Wayland to test his).

Also doesn't matter whether I'm using the window borders to resize or Alt+right-click.
Comment 3 Kai Uwe Broulik 2016-10-30 12:38:14 UTC
Indeed, if I manually disable decorations (window menu → More Actions → No Borders) resizing works as expected.
Comment 4 Martin Flöser 2016-11-18 11:36:31 UTC
Fix at: https://phabricator.kde.org/D3414
Comment 5 Martin Flöser 2016-11-18 14:34:10 UTC
Git commit 16c7650d760f2d0b9e2d0d826b820963dc3d018c by Martin Gräßlin.
Committed on 18/11/2016 at 11:36.
Pushed by graesslin into branch 'Plasma/5.8'.

Fix AbstractClient::sizeForClientSize

Summary:
The method is supposed to return the AbstractClient's size for a given
client size. That is the size including the window decoration.

The default implementation returned the passed in client size without
adjusting for the decoration. This resulted in ShellClient getting a
wrong size especially when AbstractClient::adjustedClientSize (which
calls sizeForClientSize) was called.

The result of the incorrect size was for example a shrinking of the
window when starting to resize a window.
FIXED-IN: 5.8.4

Reviewers: #kwin, #plasma_on_wayland, broulik, subdiff

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3414

M  +1    -1    abstract_client.cpp
M  +1    -0    autotests/integration/shell_client_test.cpp

http://commits.kde.org/kwin/16c7650d760f2d0b9e2d0d826b820963dc3d018c