Prevent activation of windows with Qt::WindowDoesNotAcceptFocus.
Task-number: QTBUG-32385 Change-Id: I307e2a3e5157b351663940d5d02fc16b3127b5dd Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
b02eb3b436
commit
a0996b8b60
@ -871,6 +871,10 @@ QRegion QWindow::mask() const
|
||||
void QWindow::requestActivate()
|
||||
{
|
||||
Q_D(QWindow);
|
||||
if (flags() & Qt::WindowDoesNotAcceptFocus) {
|
||||
qWarning() << "requestActivate() called for " << this << " which has Qt::WindowDoesNotAcceptFocus set.";
|
||||
return;
|
||||
}
|
||||
if (d->platformWindow)
|
||||
d->platformWindow->requestActivateWindow();
|
||||
}
|
||||
|
@ -1643,7 +1643,8 @@ void QXcbWindow::handleButtonPressEvent(const xcb_button_press_event_t *event)
|
||||
{
|
||||
if (window() != QGuiApplication::focusWindow()) {
|
||||
QWindow *w = static_cast<QWindowPrivate *>(QObjectPrivate::get(window()))->eventReceiver();
|
||||
w->requestActivate();
|
||||
if (!(w->flags() & Qt::WindowDoesNotAcceptFocus))
|
||||
w->requestActivate();
|
||||
}
|
||||
|
||||
updateNetWmUserTime(event->time);
|
||||
|
Loading…
Reference in New Issue
Block a user