0

Trying to add a tray menu to a GTK+ (2.24) application on Windows 10, in C. Code is exactly as in this example, except the icon. The result is as follows, menu is not visible and there are up and down arrows instead:

Tray Menu Result

In this example (French forum, code works when an image is provided), only down arrow appears and it is possible sometimes (1 over 10) to actually display the menu entry by right-clicking long time on the arrow.

Question is: is this a GTK+ bug, as stated in several forums, or is there a way to create a menu from a tray icon using GTK+ without implementing a custom-drawn one?

Edit: replaced wrong GTK2 tag by GTK.

evilmandarine
  • 4,241
  • 4
  • 17
  • 40
  • My guess is you have not renamed the icon to display to a locally available `.png` file on your computer (or used a path that Gtk understands, e.g. `/Users/you/Documents/....` or escaping with `"\\"` path separators). Otherwise, the first example works fine on both Linux and Win7 (I get the `View` and `Exit` popup menu on right-click on icon in the tray). – David C. Rankin Aug 04 '19 at 18:06
  • @DavidC.Rankin Thank you for the comment. The icon is displayed (it's that one shown on the picture). It's the View and Exit that I cannot see on Win10, only those arrows. I'll also try on other environments and post an update. – evilmandarine Aug 04 '19 at 19:42
  • Ah, OK, I'll boot Win10 and give it a try there. – David C. Rankin Aug 04 '19 at 19:58

0 Answers0