Bug 382698 - wayland windows react wrongly to middle/right clicks on maximise button
Summary: wayland windows react wrongly to middle/right clicks on maximise button
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.10.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-25 08:59 UTC by Frederik Gladhorn
Modified: 2018-10-05 15:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: Wayland+
mgraesslin: X11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederik Gladhorn 2017-07-25 08:59:27 UTC
When running a wayland session, right and middle clicking the maximize button in the windeco works as expected for wayland native windows.
For windows using xwayland on the other hand, right and middle clicks are the same as left clicks.
Comment 1 Martin Flöser 2017-07-25 15:01:29 UTC
Could it be that you mixed up xwayland and wayland here? Because the expected thing for me would be: partial maximize works for xwayland, but does not work for wayland.
Comment 2 Patrick Silva 2017-08-07 05:31:52 UTC
Martin is right. This bug affects Wayland windows, xwayland windows are ok.
Or it's not a bug, it's intentional?
Comment 3 Frederik Gladhorn 2018-05-02 08:57:22 UTC
I think you are right and I simply mixed up the two. I agree of course that it's not the most important feature in the world, but it's on of the small stumbling blocks that makes me come back to using X instead.
Comment 4 Martin Flöser 2018-05-02 16:06:22 UTC
The thing is: Wayland doesn't have a horizontal/vertical maximize mode.
Comment 5 David Edmundson 2018-10-05 15:54:26 UTC
Git commit e327cce4bc92aa028c7aefcec13f6239b08aa5bf by David Edmundson.
Committed on 05/10/2018 at 15:35.
Pushed by davidedmundson into branch 'master'.

[wayland] Asyncronously update maximise flags

Summary:
A window maximising is an async operation. We work out what size we want
the client to be, then request the client to update. The window isn't
really maximised until we get that new buffer with the new size.

This patch splits the requested, pending and current state, updating as
appropriate.

Things are a bit complex with things like borders. Technically we
shouldn't update them till we get a response, but we also need to have
the correct geometry of the full size window in our request. For now
they behave as before, updating when we request the change.

X code is untouched.

This hopefully fixes maximise animations on wayland as now we update the
geometry before emitting maximisedChanged.

Test Plan:
Maximised a window with the button and double clicking title bar.

I get only the following events on maximise/restore:
19:51:39.156 KWin::EffectsHandlerImpl::slotGeometryShapeChanged geometry
shape changed QRect(47,24 640x509) QRect(0,0 716x573)
19:51:39.157 KWin::EffectsHandlerImpl::slotClientMaximized slot client
maximised true true

19:51:40.522 KWin::EffectsHandlerImpl::slotGeometryShapeChanged geometry
shape changed QRect(0,0 716x573) QRect(47,24 640x509)
19:51:40.522 KWin::EffectsHandlerImpl::slotClientMaximized slot client
maximised false false

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, zzag, kwin

Tags: #kwin

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

M  +9    -2    autotests/integration/shell_client_test.cpp
M  +36   -16   shell_client.cpp
M  +8    -1    shell_client.h

https://commits.kde.org/kwin/e327cce4bc92aa028c7aefcec13f6239b08aa5bf