macOS: don't let windows that are transparent for input become key window
Such windows are typically used as mostly transparent overlays on top of other windows underneath. Letting such an overlay become the key window breaks cursor updates and focus handling. Fixes: QTBUG-83632 Change-Id: I192d419a5bdb8dfa0e9223e9fbbd7876c62fe743 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 24b07b2b2d367c61b911c8f3a72f7209ef7e00d2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
aebbf928fa
commit
e1cc406ea4
@ -1857,7 +1857,7 @@ bool QCocoaWindow::shouldRefuseKeyWindowAndFirstResponder()
|
||||
// This function speaks up if there's any reason
|
||||
// to refuse key window or first responder state.
|
||||
|
||||
if (window()->flags() & Qt::WindowDoesNotAcceptFocus)
|
||||
if (window()->flags() & (Qt::WindowDoesNotAcceptFocus | Qt::WindowTransparentForInput))
|
||||
return true;
|
||||
|
||||
if (m_inSetVisible) {
|
||||
|
@ -265,7 +265,8 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
|
||||
|
||||
- (BOOL)canBecomeFirstResponder
|
||||
{
|
||||
return !(self.platformWindow->window()->flags() & Qt::WindowDoesNotAcceptFocus);
|
||||
return !(self.platformWindow->window()->flags() & (Qt::WindowDoesNotAcceptFocus
|
||||
| Qt::WindowTransparentForInput));
|
||||
}
|
||||
|
||||
- (BOOL)becomeFirstResponder
|
||||
|
Loading…
x
Reference in New Issue
Block a user