Bug 20977 - StatusIcon does not work correctly on Mac
Summary: StatusIcon does not work correctly on Mac
Status: NEW
Alias: None
Product: Gtk#
Classification: Mono
Component: gtk-sharp ()
Version: 2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-06-30 11:20 UTC by dubcanada
Modified: 2014-06-30 11:22 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 20977 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description dubcanada 2014-06-30 11:20:36 UTC

On Mac if I have an application which creates a StatusIcon and has a event for PopupMenu that creates a "popup menu" if you click on it it shows the popup menu correctly and everything is good, but the problem is it doesn't disappear, it's suppose to disappear if you click elsewhere or if you click it again.

		StatusIcon trayIcon = new StatusIcon (new Pixbuf ("test.png"));
		trayIcon.Visible = true;

		trayIcon.PopupMenu += OnTrayIconPopup;

		static void OnTrayIconPopup (object o, EventArgs args) {
			Menu popupMenu = new Menu();
			ImageMenuItem menuItemQuit = new ImageMenuItem ("Quit");
			Gtk.Image appimg = new Gtk.Image(Stock.Quit, IconSize.Menu);
			menuItemQuit.Image = appimg;
			// Quit the application when quit has been clicked.
			menuItemQuit.Activated += delegate { Application.Quit(); };

Will replicate it.
Comment 1 dubcanada 2014-06-30 11:22:09 UTC
Appears to be a problem with GTK 2.12 (not sure if it's fixed in a later version or GTK+3) see https://bugzilla.gnome.org/show_bug.cgi?id=549153