fix(tray): restore Activate support for compliant SNI implementation

Set ItemIsMenu to true by default because libappindicator supports
neither ItemIsMenu nor Activate method and compiant SNI implementations
are expected to reset the flag during initial property fetch.
To be revisited if anyone finds the implementation that has Activate
but does not set ItemIsMenu.
This commit is contained in:
Aleksei Bavshin
2019-06-14 06:44:11 -07:00
parent 9d0842db48
commit 642fd48af1
2 changed files with 7 additions and 2 deletions

View File

@ -334,7 +334,7 @@ void Item::makeMenu(GdkEventButton* const& ev) {
bool Item::handleClick(GdkEventButton* const& ev) {
auto parameters = Glib::VariantContainerBase::create_tuple(
{Glib::Variant<int>::create(ev->x), Glib::Variant<int>::create(ev->y)});
if ((ev->button == 1 && (item_is_menu || !menu.empty())) || ev->button == 3) {
if ((ev->button == 1 && item_is_menu) || ev->button == 3) {
makeMenu(ev);
if (gtk_menu != nullptr) {
#if GTK_CHECK_VERSION(3, 22, 0)