diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e0aad56..6fd6b77d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [1.9.6 / 5.64.6] - 2023-05-?? +### Changed +- Don't close submenus on mouse-leave [#2963](https://github.com/sandboxie-plus/Sandboxie/issues/2963) + ### Fixed - fixed an issue with token manipulation in the SbieDrv driver diff --git a/SandboxiePlus/SandMan/main.cpp b/SandboxiePlus/SandMan/main.cpp index ab47af70..894006ef 100644 --- a/SandboxiePlus/SandMan/main.cpp +++ b/SandboxiePlus/SandMan/main.cpp @@ -14,6 +14,18 @@ CSettings* theConf = NULL; QString g_PendingMessage; +class CCustomStyle : public QProxyStyle { +public: + CCustomStyle(QStyle* style = 0) : QProxyStyle(style) {} + + int styleHint(StyleHint stylehint, const QStyleOption* opt = nullptr, + const QWidget* widget = nullptr, QStyleHintReturn* returnData = nullptr) const + { + if (stylehint == SH_Menu_SubMenuSloppyCloseTimeout) + return -1; + return QProxyStyle::styleHint(stylehint, opt, widget, returnData); + } +}; int main(int argc, char *argv[]) { srand(QDateTime::currentDateTimeUtc().toSecsSinceEpoch()); @@ -62,6 +74,9 @@ int main(int argc, char *argv[]) QtSingleApplication app(argc, argv); app.setQuitOnLastWindowClosed(false); + CCustomStyle* style = new CCustomStyle(app.style()); + app.setStyle(style); + //InitConsole(false); bool IsBoxed = GetModuleHandle(L"SbieDll.dll") != NULL;