handle window style if failed to allocate znode for fixed ones

This commit is contained in:
Vincent Wei
2020-01-17 12:00:11 +08:00
parent d240c4ceb3
commit 9d0e3aaf24
+24
View File
@@ -1624,6 +1624,30 @@ static int dskAddNewMainWindow (PMAINWIN pWin, const COMPOSITINGINFO* ct_info)
if (pWin->idx_znode <= 0)
return -1;
/* Since 4.2.0: handle window style if failed to allocate znode for fixed ones */
if (pWin->dwExStyle & WS_EX_WINTYPE_MASK) {
ZORDERNODE* nodes = GET_ZORDERNODE(__mg_zorder_info);
pWin->dwExStyle &= ~WS_EX_WINTYPE_MASK;
switch (nodes [pWin->idx_znode].flags & ZOF_TYPE_MASK) {
case ZOF_TYPE_SCREENLOCK:
pWin->dwExStyle |= WS_EX_WINTYPE_SCREENLOCK;
break;
case ZOF_TYPE_DOCKER:
pWin->dwExStyle |= WS_EX_WINTYPE_DOCKER;
break;
case ZOF_TYPE_LAUNCHER:
pWin->dwExStyle |= WS_EX_WINTYPE_LAUNCHER;
break;
case ZOF_TYPE_TOPMOST:
pWin->dwExStyle |= WS_EX_TOPMOST;
break;
case ZOF_TYPE_NORMAL:
default:
break;
}
}
/* Handle main window hosting. */
if (pWin->pHosting)
dskAddNewHostedMainWindow (pWin->pHosting, pWin);