fix(tray): pre-create dbusmenu for tray items

It seems that dbusmenu is not ready to display menu immediately and
needs some time to sync data via DBus.
Fixes LIBDBUSMENU-GLIB-CRITICAL: dbusmenu_menuitem_send_about_to_show:
assertion 'DBUSMENU_IS_MENUITEM(mi)' failed.
Also fixes initial render of the menu with layer shell popups support patch.
This commit is contained in:
Aleksei Bavshin
2019-08-24 08:20:32 -07:00
parent 642fd48af1
commit 01ad3d96d8
2 changed files with 4 additions and 3 deletions

View File

@ -65,7 +65,7 @@ class Item : public sigc::trackable {
Glib::RefPtr<Gdk::Pixbuf> extractPixBuf(GVariant* variant);
Glib::RefPtr<Gdk::Pixbuf> getIconByName(const std::string& name, int size);
static void onMenuDestroyed(Item* self, GObject* old_menu_pointer);
void makeMenu(GdkEventButton* const& ev);
void makeMenu();
bool handleClick(GdkEventButton* const& /*ev*/);
Glib::RefPtr<Gio::DBus::Proxy> proxy_;