diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-09-06 22:55:07 +0200 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-02-13 11:18:50 +0000 |
commit | 8458e06b25c07ebc8cf6b210fc1ea4cc9aeb42eb (patch) | |
tree | f4290dd20b3f308e6c2c90ff695d2cdd26cd9544 /src/client/qwaylanddisplay.cpp | |
parent | 6dff366179a40abd8327170d926cb535ad0ff14d (diff) | |
download | qtwayland-8458e06b25c07ebc8cf6b210fc1ea4cc9aeb42eb.tar.gz qtwayland-8458e06b25c07ebc8cf6b210fc1ea4cc9aeb42eb.tar.bz2 qtwayland-8458e06b25c07ebc8cf6b210fc1ea4cc9aeb42eb.zip |
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: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index fda2c204..9dedabda 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -128,6 +128,9 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration) , mQtKeyExtension(0) , mTextInputManager(0) , mHardwareIntegration(0) + , mLastInputSerial(0) + , mLastInputDevice(0) + , mLastInputWindow(0) { qRegisterMetaType<uint32_t>("uint32_t"); @@ -359,4 +362,11 @@ bool QWaylandDisplay::supportsWindowDecoration() const return integrationSupport; } +void QWaylandDisplay::setLastInputDevice(QWaylandInputDevice *device, uint32_t serial, QWaylandWindow *win) +{ + mLastInputDevice = device; + mLastInputSerial = serial; + mLastInputWindow = win; +} + QT_END_NAMESPACE |