FS#54850 - [breeze] qtwayland clients do not respond to mouse input on Qt-based compositors

Attached to Project: Arch Linux
Opened by Johan Klokkhammer Helsing (johanhelsing) - Monday, 17 July 2017, 15:03 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 20 July 2017, 08:17 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Antonio Rojas (arojas)
Felix Yan (felixonmars)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

## Description:

Qt Wayland clients do not respond to mouse input on Qt-based compositors.

## Additional info:

package version(s):

- qt5-wayland 5.9.1-2
- qt5-base 5.9.1-3

## Steps to reproduce:

Run the attached minimal compositor as an X client with

$ qmlscene minimal-compositor.qml -platform xcb

Then run a Qt client with the wayland backend, I.e. the attached rectangle.qml

$ qmlscene rectangle-mousearea.qml -platform wayland

Try to click the green in the window

### Expected result:

The green window should turn blue when you click it.

You should also be able to drag the window around the screen.

### Actual result:

Nothing happens, and you're not able to move the window.

## Probably not a compositor bug, can't reproduce outside PKGBUILD

I tried building Qt manually with the same source packages that arch uses, the same patches and most of the same configure options:

./configure -confirm-license -opensource -v
-nomake tests
-developer-build
-plugin-sql-psql
-plugin-sql-mysql
-plugin-sql-sqlite
-plugin-sql-odbc
-plugin-sql-ibase
-system-sqlite
-openssl-linked
-nomake examples
-optimized-qmake
-dbus-linked
-system-harfbuzz
-journald
-no-use-gold-linker
-reduce-relocations

I.e. I removed the `-no-rpath`, `-prefix` and other path flags and added `-developer-build`.

And I did not experience the issue with the resulting build. Also, I see the issue when I run system-version Qt clients on Qt compositors built manually, but not the other way around. Non-qt clients also run fine.

I can also see the mouse events being passed over the Wayland protocol when running QT_WAYLAND_DEBUG=1.

I also tried with non-qml clients, so the bug is not related to qtdeclarative.

As long as this is an Arch-only bug, I don't have the time to look further into it.
This task depends upon

Closed by  Antonio Rojas (arojas)
Thursday, 20 July 2017, 08:17 GMT
Reason for closing:  Upstream
Additional comments about closing:  See upstream report for details
Comment by Antonio Rojas (arojas) - Monday, 17 July 2017, 17:16 GMT
Did you build the entire qt or just qtbase?
Comment by Antonio Rojas (arojas) - Monday, 17 July 2017, 20:32 GMT
The exact same issue is reported upstream for Ubuntu, so not Arch specific

https://bugreports.qt.io/browse/QTBUG-60725
Comment by Eli Schwartz (eschwartz) - Monday, 17 July 2017, 22:12 GMT
In fact, Johan Helsing self-assigned that QTBUG back in May...
Comment by Johan Klokkhammer Helsing (johanhelsing) - Tuesday, 18 July 2017, 06:57 GMT
Sorry, but I don't think that's same issue. In the Ubuntu bug, the mouse pressed event is received by the client, but the released event is not delivered. The bug happens when another window appears and steals the focus in the middle of a click.

In this bug there's no mouse clicks at all.

I built just qtbase and qtwayland.
Comment by Antonio Rojas (arojas) - Tuesday, 18 July 2017, 10:14 GMT
Just tested on an Ubuntu docker image: same issue.
Rebuilt qtbase and qtwayland with -developer-build: same issue.

Please post the exact steps you used to build the working version.
Comment by Antonio Rojas (arojas) - Tuesday, 18 July 2017, 18:02 GMT
After some debugging over IRC, we figured out this is a Breeze style issue. Forwarded upstream https://bugs.kde.org/show_bug.cgi?id=382473