mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 1873e4116f into merged_master (Bitcoin PR bitcoin-core/gui#831)
This commit is contained in:
commit
5cbf94a40a
1 changed files with 17 additions and 10 deletions
|
|
@ -412,19 +412,26 @@ bool isObscured(QWidget *w)
|
|||
|
||||
void bringToFront(QWidget* w)
|
||||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
ForceActivation();
|
||||
#endif
|
||||
|
||||
if (w) {
|
||||
// activateWindow() (sometimes) helps with keyboard focus on Windows
|
||||
if (w->isMinimized()) {
|
||||
w->showNormal();
|
||||
} else {
|
||||
if (QGuiApplication::platformName() == "wayland") {
|
||||
auto flags = w->windowFlags();
|
||||
w->setWindowFlags(flags|Qt::WindowStaysOnTopHint);
|
||||
w->show();
|
||||
w->setWindowFlags(flags);
|
||||
w->show();
|
||||
} else {
|
||||
#ifdef Q_OS_MACOS
|
||||
ForceActivation();
|
||||
#endif
|
||||
// activateWindow() (sometimes) helps with keyboard focus on Windows
|
||||
if (w->isMinimized()) {
|
||||
w->showNormal();
|
||||
} else {
|
||||
w->show();
|
||||
}
|
||||
w->activateWindow();
|
||||
w->raise();
|
||||
}
|
||||
w->activateWindow();
|
||||
w->raise();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue