<table><tr><td style="">i.Dark_Templar added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7260" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Current implementation is buggy. Cached menu items may be invalid: after 'LayoutUpdate' event updated menu all of it submenus are no longer valid (and thus cache contains invalid data) and should be updated. Menu itself is updated, but it's submenus are not. It's just usually happens that new submenu data is same as old submenu data, but in case it's not, you'll never get new submenu data and never see updated submenu. See example in menubugtest.tar.bz2 attached to linked bug (and description there).</p>
<p>If you compare implementation of upstream libdbusmenu-qt and current implementation bundled into kde, you'll notice that upstream on 'LayoutUpdate' event updates all submenus synchronously and thus it obtains new correct submenus. Current code never obtains new submenus and always shows old ones.<br />
To work properly, you have to receive new data, either on 'LayoutUpdate' event (as upstream does), on 'AboutToShow' event (as my patch does) or somehow else. Current implementation never does. Just showing old submenus is incorrect. Current change doesn't seem like a hack if you compare current state of kde code to upstream libdbusmenu-qt.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7260" rel="noreferrer">https://phabricator.kde.org/D7260</a></div></div><br /><div><strong>To: </strong>i.Dark_Templar, Plasma, davidedmundson<br /><strong>Cc: </strong>plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas<br /></div>