Client: Avoid activating window on show if Qt::WindowDoesNotAcceptFocus is set
The Qt::WindowDoesNotAcceptFocus flag provides one more clue regarding what the user intends to achieve. Technically though, the does not accept focus flag doesn't influence a lot in practice as it's not communicated back to the compositor, but it's still suitable for determining whether the window needs to be activated when it's shown. Change-Id: Idf80c1701966870b4bbe422ecb9c7cb33e3a6bc0 Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
parent
af1f258c11
commit
e7539d2ee8
@ -588,6 +588,10 @@ bool QWaylandXdgSurface::requestActivateOnShow()
|
||||
if (type == Qt::ToolTip || type == Qt::Popup || type == Qt::SplashScreen)
|
||||
return false;
|
||||
|
||||
const Qt::WindowFlags flags = m_window->window()->flags();
|
||||
if (flags & Qt::WindowDoesNotAcceptFocus)
|
||||
return false;
|
||||
|
||||
if (m_window->window()->property("_q_showWithoutActivating").toBool())
|
||||
return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user