Commit 8458e06b authored by Laszlo Agocs's avatar Laszlo Agocs Committed by Giulio Camuffo
Browse files

Sanitize popup behavior.


Popups are pretty important for widget apps. Menus, combobox dropdows
and such are all popups. Currently they are completely borked when
activated via keyboard or touch. This is because of the bizarre set_popup
request in the protocol, and Weston's current implementation, that ignore
the fact that a popup can be opened as a result of a keyboard event too
or may not originate from an input event at all.

Pass the last input device and serial we have seen, regardless of the type,
by tracking it globally in the QWaylandDisplay.

With this patch menus and such will not freeze the application anymore
when activated with keyboard or touch without sending a mouse event
to the window first. The behavior is still broken in some ways, especially
with keyboard due to immediately getting a popup_done, but at least
applications remain usable.

Task-number: QTBUG-41142
Task-number: QTBUG-41147
Change-Id: I18de501004ae8a62ff8667e72225d08c2d3ba491
Reviewed-by: default avatarLaszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: default avatarJørgen Lind <jorgen.lind@theqtcompany.com>
parent 6dff3661
Showing with 37 additions and 21 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment