broulik created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY We copy "ctx" pointer by value into our lambda but by the time our timer fires, it might be gone already. Instead, pass "ctx" as context to QTimer::singleShot so it won't fire when it's gone. BUG: 382386 FIXED-IN: 5.10.5 TEST PLAN I don't have Visual Studio Code but it's probably related to Electron constantly updating the global menu causing us to re-create the buttons all the time. Tested that the function is still called here and seems to have worked fine. It probably will not ungrab for the aforementioned app but I'd rather have QtQuick have a wrong mouse state than having plasma crash ;) REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D6951 AFFECTED FILES applets/appmenu/lib/appmenuapplet.cpp To: broulik, #plasma, davidedmundson Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas