Send key events to the active window when tlw in qpa event is null
Change-Id: Ie055918276d716b0f4f23b6a9d34c23c5459d960 Reviewed-on: http://codereview.qt-project.org/5777 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>bb10
parent
b863df7de9
commit
fc8b62222c
|
|
@ -636,6 +636,8 @@ void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::Wh
|
|||
void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent *e)
|
||||
{
|
||||
QWindow *window = e->window.data();
|
||||
if (e->nullWindow)
|
||||
window = QGuiApplication::activeWindow();
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -128,8 +128,9 @@ public:
|
|||
class UserEvent : public WindowSystemEvent {
|
||||
public:
|
||||
UserEvent(QWindow * w, ulong time, EventType t)
|
||||
: WindowSystemEvent(t), window(w), timestamp(time) { }
|
||||
: WindowSystemEvent(t), window(w), nullWindow(w == 0), timestamp(time) { }
|
||||
QWeakPointer<QWindow> window;
|
||||
bool nullWindow;
|
||||
unsigned long timestamp;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue