[DBusMenuImporter] Send "opened" signal alongside about to show
ClosedPublic

Authored by broulik on Jan 3 2018, 9:13 AM.

Details

Summary

Firefox deliberately ignores the "about-to-show" event and only updates its menus in response to "opened".
There was an unused slot to send an "opened" event. Use that and place the updateMenu call inside.
Also use an UniqueConnection.

Test Plan

Firefox window decoration menu buttons seem to work mostly fine now. Didn't notice any issues with other already working apps. If someone could test whether Electron apps still behave well with it. Global menu applet needs an additional patch for Firefox to work correctly with it.

https://bazaar.launchpad.net/~mozillateam/firefox/firefox-trunk.head/view/head:/debian/patches/unity-menubar.patch#L955

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jan 3 2018, 9:13 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 3 2018, 9:13 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jan 3 2018, 9:13 AM
broulik edited the test plan for this revision. (Show Details)Jan 3 2018, 9:18 AM
davidedmundson added inline comments.Jan 3 2018, 9:58 AM
libdbusmenuqt/dbusmenuimporter.cpp
433–434

This needs to be a unique connection see https://phabricator.kde.org/D5706

(which might mean moving updateMenu into slotMenuAboutToShow)

broulik edited the summary of this revision. (Show Details)Jan 3 2018, 11:10 AM
broulik edited the test plan for this revision. (Show Details)
broulik updated this revision to Diff 24657.Jan 3 2018, 11:16 AM
davidedmundson accepted this revision.Jan 4 2018, 6:52 PM
This revision is now accepted and ready to land.Jan 4 2018, 6:52 PM
This revision was automatically updated to reflect the committed changes.