mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fix: don't parent popup windows on Windows OS (#4181)
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com> Co-authored-by: pajlada <rasmus.karlsson@pajlada.com> fix https://github.com/Chatterino/chatterino2/issues/3863 fix https://github.com/Chatterino/chatterino2/issues/4180
This commit is contained in:
parent
ff4899f545
commit
9d1b8b0a93
2 changed files with 7 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
- Bugfix: Fixed being unable to see the usercard of VIPs who have Asian language display names. (#4174)
|
- Bugfix: Fixed being unable to see the usercard of VIPs who have Asian language display names. (#4174)
|
||||||
- Bugfix: Fixed the wrong right-click menu showing in the chat input box. (#4177)
|
- Bugfix: Fixed the wrong right-click menu showing in the chat input box. (#4177)
|
||||||
|
- Bugfix: Fixed popup windows not appearing/minimizing correctly on the Windows taskbar. (#4181)
|
||||||
|
|
||||||
## 2.4.0-beta
|
## 2.4.0-beta
|
||||||
|
|
||||||
|
|
|
@ -262,12 +262,18 @@ Window &WindowManager::createWindow(WindowType type, bool show, QWidget *parent)
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: On Windows, parenting popup windows causes unwanted behavior (see
|
||||||
|
// https://github.com/Chatterino/chatterino2/issues/4179 for discussion). Ideally, we
|
||||||
|
// would use a different solution rather than relying on OS-specific code but this is
|
||||||
|
// the low-effort fix for now.
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
if (type == WindowType::Popup)
|
if (type == WindowType::Popup)
|
||||||
{
|
{
|
||||||
// On some window managers, popup windows require a parent to behave correctly. See
|
// On some window managers, popup windows require a parent to behave correctly. See
|
||||||
// https://github.com/Chatterino/chatterino2/pull/1843 for additional context.
|
// https://github.com/Chatterino/chatterino2/pull/1843 for additional context.
|
||||||
return &(this->getMainWindow());
|
return &(this->getMainWindow());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// If no parent is set and something other than a popup window is being created, we fall
|
// If no parent is set and something other than a popup window is being created, we fall
|
||||||
// back to the default behavior of no parent.
|
// back to the default behavior of no parent.
|
||||||
|
|
Loading…
Reference in a new issue