There are known issues around handling windows focus in Wayland
(this one specific in KDE but also in gnome).
The idea is that the workaround will be executed if bitcoin-qt
is running using Wayland
platform (e.g.: QT_QPA_PLATFORM=wayland ./src/qt/bitcoin-qt -regtest
), since the workaround behaviour looks like re-opening the window again (which I tried to fix by moving the window to the original position and/ or re-setting the original geometry without success) while in X11
(not sure in Mac) the current GUIUtil::brintToFront
actually sets the focus to the desired window, keeping its original position as expected, and I didn’t want to change that (X11
behaviour).
The solution was initially discussed with hebasto in #817.