8000 fix: libappindicator left-click support by janci007 · Pull Request #35319 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: libappindicator left-click support #35319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions shell/browser/ui/gtk/app_indicator_icon_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,14 @@ void AppIndicatorIconMenu::UpdateClickActionReplacementMenuItem(
} else {
click_action_replacement_menu_item_added_ = true;

// If |menu_model_| is non empty, add a separator to separate the
// "click action replacement menu item" from the other menu items.
if (menu_model_ && menu_model_->GetItemCount() > 0) {
GtkWidget* menu_item = gtk_separator_menu_item_new();
gtk_widget_show(menu_item);
gtk_menu_shell_prepend(GTK_MENU_SHELL(gtk_menu_), menu_item);
}

// create a hidden menu item that will be activated from libappindicator on
// tray icon click
GtkWidget* menu_item = gtk_menu_item_new_with_mnemonic(label);
g_object_set_data(G_OBJECT(menu_item), "click-action-item",
GINT_TO_POINTER(1));
g_signal_connect(menu_item, "activate",
G_CALLBACK(OnClickActionReplacementMenuItemActivatedThunk),
this);
gtk_widget_show(menu_item);
gtk_menu_shell_prepend(GTK_MENU_SHELL(gtk_menu_), menu_item);
}
}
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/ui/tray_icon_gtk.cc 7797
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void TrayIconGtk::OnClick() {
}

bool TrayIconGtk::HasClickAction() {
return false;
return true;
}

// static
Expand Down
0