Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
win: system menu: fix separator can't be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwenx190 committed Oct 20, 2023
1 parent 4821e89 commit c7f4868
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/utils_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,8 @@ bool Utils::showSystemMenu(const WId windowId, const QPoint &pos, const bool sel
::EnableMenuItem(hMenu, SC_CLOSE, (MF_BYCOMMAND | (disableClose ? MFS_DISABLED : MFS_ENABLED)));
}
if (removeSeparator) {
if (::DeleteMenu(hMenu, SC_SEPARATOR, MF_BYCOMMAND) == FALSE) {
// Looks like we must use 0 for the second parameter here, otherwise we can't remove the separator.
if (::DeleteMenu(hMenu, 0, MFT_SEPARATOR) == FALSE) {
//WARNING << getSystemErrorMessage(kDeleteMenu);
}
}
Expand Down

0 comments on commit c7f4868

Please sign in to comment.