Merge pull request #20633 from ZehMatt/ignore-dead-window

Ignore dead windows to determine insertion position
This commit is contained in:
Matthias Moninger authored and GitHub committed 2023-07-19 00:54:53 +03:00
commit 514b74c8b3
1 file changed
+4
+4
View File
@@ -244,6 +244,8 @@ WindowBase* WindowCreate(
{
for (auto it = g_window_list.begin(); it != g_window_list.end(); it++)
{
if ((*it)->flags & WF_DEAD)
continue;
if (!((*it)->flags & WF_STICK_TO_BACK))
{
itDestPos = it;
@@ -254,6 +256,8 @@ WindowBase* WindowCreate(
{
for (auto it = g_window_list.rbegin(); it != g_window_list.rend(); it++)
{
if ((*it)->flags & WF_DEAD)
continue;
if (!((*it)->flags & WF_STICK_TO_FRONT))
{
itDestPos = it.base();