xcb: Avoid recreating xcb window in QXcbWindow::requestActivateWindow()
12203e94f5a34b59b6a7389402c854e823135a35 exposes the issue in xcb qpa plugin. We should not recreate xcb window via the call of focusWindow->winId(). Fixes: QTBUG-123032 Pick-to: 6.6 6.5 6.2 5.15 Change-Id: I6da4f3e64a9d7a92a2aab714591986c5d128fbd4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 23a906335e0d8a03388bbd73db43682c724d04a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5195c6683d
commit
167287e11a
@ -1475,6 +1475,11 @@ void QXcbWindow::requestActivateWindow()
|
||||
|
||||
updateNetWmUserTime(connection()->time());
|
||||
QWindow *focusWindow = QGuiApplication::focusWindow();
|
||||
xcb_window_t current = XCB_NONE;
|
||||
if (focusWindow) {
|
||||
if (QPlatformWindow *pw = focusWindow->handle())
|
||||
current = pw->winId();
|
||||
}
|
||||
|
||||
if (window()->isTopLevel()
|
||||
&& !(window()->flags() & Qt::X11BypassWindowManagerHint)
|
||||
@ -1489,7 +1494,7 @@ void QXcbWindow::requestActivateWindow()
|
||||
event.type = atom(QXcbAtom::Atom_NET_ACTIVE_WINDOW);
|
||||
event.data.data32[0] = 1;
|
||||
event.data.data32[1] = connection()->time();
|
||||
event.data.data32[2] = focusWindow ? focusWindow->winId() : XCB_NONE;
|
||||
event.data.data32[2] = current;
|
||||
event.data.data32[3] = 0;
|
||||
event.data.data32[4] = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user