Skip to content
Commit 6689abaf authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[Shell Corona] Work around popup dismissal bug on Wayland

A popup needs to grab the keyboard and the pointer in order to dismiss
itself when another window is clicked. It works perfectly on X11.

On Wayland though, the compositor is responsible for dismissing popups
if some surface of another application has been clicked. Note that I
said "of another application." If user clicks some surface of the same
application, the compositor won't dismiss the popup.

If the application uses only QtWidgets, then the popup will be closed
as expected in both cases. But if the application uses both Qt Quick and
Qt Widgets, e.g. plasmashell, then the popup won't be dismissed if a
QQuickItem has been clicked.

It is a Qt bug, but for the time being, this change introduces an event
filter that monitors Qt::MouseButtonPress events and when needed closes
the active popup widget. This is a workaround.

CCBUG: 379635
parent 333e8ef5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment