wasm: don't call requestActivate for windows that don't want it

QWindows that set Qt::QWindowDoesNotAcceptFocus like QtVirtualKeyboard
should not get focus.

gets rid of message:
requestActivate() called for  QtVirtualKeyboard::InputView(0x1cdf130)  which has Qt::WindowDoesNotAcceptFocus set.

Change-Id: I649a8cff599769727beaeee11039cf1291fd502d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit e766df030bc1afe7a654baa59efe5165f6b6cda9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Lorn Potter 2023-12-29 14:17:38 +10:00 committed by Qt Cherry-pick Bot
parent a7f052319b
commit 5fd6ad5101

View File

@ -68,7 +68,8 @@ bool ClientArea::processPointer(const PointerEvent &event)
switch (event.type) {
case EventType::PointerDown:
m_element.call<void>("setPointerCapture", event.pointerId);
m_window->window()->requestActivate();
if ((m_window->window()->flags() & Qt::WindowDoesNotAcceptFocus) != Qt::WindowDoesNotAcceptFocus)
m_window->window()->requestActivate();
break;
case EventType::PointerUp:
m_element.call<void>("releasePointerCapture", event.pointerId);