summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2018-09-19 11:40:31 +0200
committerGatis Paeglis <gatis.paeglis@qt.io>2018-10-16 06:57:01 +0000
commit00ae1e6b7bf6efa5f5e57d37844e44d521604fb6 (patch)
tree7e6c8177f2f9796b30df490f8d582d6668d9f9fa /src/widgets
parentdd8a66daa497f0547f2fcddc0ee1e722d13ab98b (diff)
xcb: respect QEventLoop::ExcludeUserInputEvents in native event handlers
This was a regression from Qt 4. Before this patch, we supported filtering events only at QWindowSystemInterface level, but to properly support filtering in QAbstractEventDispatcher::filterNativeEvent, we have to filter the events earlier. Now it is possible to enable/disable this feature for platforms that support native event filtering. The mapping of which events are user input events were taken from QWindowSystemInterfacePrivate::EventType. Task-number: QTBUG-69687 Change-Id: I9a5fb9f999451c47abcdc83fdcc129b5eeb55447 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidget.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 6753c35cfc..30e34c419e 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -10096,20 +10096,24 @@ void QWidget::hideEvent(QHideEvent *)
which are passed in the \a message parameter.
In your reimplementation of this function, if you want to stop the
- event being handled by Qt, return true and set \a result.
- If you return false, this native event is passed back to Qt,
- which translates the event into a Qt event and sends it to the widget.
+ event being handled by Qt, return true and set \a result. The \a result
+ parameter has meaning only on Windows. If you return false, this native
+ event is passed back to Qt, which translates the event into a Qt event
+ and sends it to the widget.
- \note Events are only delivered to this event handler if the widget is
- has a native Window handle.
+ \note Events are only delivered to this event handler if the widget
+ has a native window handle.
\note This function superseedes the event filter functions
x11Event(), winEvent() and macEvent() of Qt 4.
+ \sa QAbstractNativeEventFilter
+
\table
\header \li Platform \li Event Type Identifier \li Message Type \li Result Type
\row \li Windows \li "windows_generic_MSG" \li MSG * \li LRESULT
\row \li macOS \li "NSEvent" \li NSEvent * \li
+ \row \li XCB \li "xcb_generic_event_t" \li xcb_generic_event_t * \li
\endtable
*/