From c5e2c6ff19e816d45f0763d7339b7856080407f0 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Mon, 7 May 2012 17:51:55 +0200 Subject: Always process window (de)activated events QApplication::setActiveWindow() is fully able to deal with null pointers for the activated window. It is in fact necessary to call it even in case of a null pointer as it is the only way to get a ApplicationDeactivated event properly queued. Without this patch no ApplicationDeactivated event get delivered when the platform plugin informs the Qt event system of the corresponding user interaction. Note: This doesn't apply to qtbase which has the proper behavior, this bug is Qt4 specific. Change-Id: I1128d0233a8f85943cfe5fc3c298a43f66b6d4aa Reviewed-by: Giuseppe D'Angelo --- src/gui/kernel/qapplication_qpa.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp index b777e38..5e55cbe 100644 --- a/src/gui/kernel/qapplication_qpa.cpp +++ b/src/gui/kernel/qapplication_qpa.cpp @@ -885,9 +885,6 @@ void QApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::Leave void QApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e) { - if (!e->activated) - return; - QApplication::setActiveWindow(e->activated.data()); } -- cgit v0.12