Close popups when blocked by modal dialog
Don't block the event that Qt depends on to close popups. Task-number: QTBUG-57292 Change-Id: Ida1f928b81868f68a7b1e19cd0b83485d2a7232e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
1a0e690d50
commit
5b65698248
@ -1914,7 +1914,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
|
||||
QMouseEvent ev(type, localPoint, localPoint, globalPoint, button, buttons, e->modifiers, e->source);
|
||||
ev.setTimestamp(e->timestamp);
|
||||
|
||||
if (window->d_func()->blockedByModalWindow) {
|
||||
if (window->d_func()->blockedByModalWindow && !qApp->d_func()->popupActive()) {
|
||||
// a modal window is blocking this window, don't allow mouse events through
|
||||
return;
|
||||
}
|
||||
|
@ -199,6 +199,7 @@ public:
|
||||
static void hideModalWindow(QWindow *window);
|
||||
static void updateBlockedStatus(QWindow *window);
|
||||
virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = 0) const;
|
||||
virtual bool popupActive() { return false; }
|
||||
|
||||
static Qt::MouseButtons buttons;
|
||||
static ulong mousePressTime;
|
||||
|
@ -164,6 +164,7 @@ public:
|
||||
#endif
|
||||
|
||||
static bool inPopupMode();
|
||||
bool popupActive() Q_DECL_OVERRIDE { return inPopupMode(); }
|
||||
void closePopup(QWidget *popup);
|
||||
void openPopup(QWidget *popup);
|
||||
static void setFocusWidget(QWidget *focus, Qt::FocusReason reason);
|
||||
|
Loading…
x
Reference in New Issue
Block a user