The Linux Administration group is for the discussion of technical issues technical issues that arise during the administration of Linux systems, including maintaining the operating system and supporting end-user applications.

What I tried was.
1. create a menu
2. connect "unmap" event to a function "CloseMenu"
3. call gtk_menu_popup to show the menu
4. call "g_main_loop_run" to show the menu until user closes the menu.
5. If the user closes the menu, "unmap" event fires, calls "CloseMenu" function, wherein i tried to close the loop using "g_main_loop_quit" and close the menu.

The problem is the application freezes while calling "g_main_loop_run".

Please let me know why it's freezes, and how to get rid of it.

Also, plz share is there any other way to show the popup as long as user clicks to close the menu.

Ok I found Sepehr a bit rude...
But to answer the question the issue is only in the "Signal" emit you connect too.

If you connect the menu to the "Activate" when the user remove the finger on the button it's not activate anymore. Same as if you connect to "Press" when he removes his finger it's not on this signal anymore either.

So it's simple, connect the menu with the 'button-release-event", so the menu will stay open because the even that he release the button still true until he clicks on something else.

Sort of difficult to find the information when given a 404 web page. There is no 3.7 reference manual page. Instead try https://developer.gnome.org/gtk3/ - there you can select one of the entries that may be relevant (probably some minor changes from what was needed). The available versions go from 3.0.12 to 3.12.1 (the development version is 3.13.8). As one can see, there is a version 3.6.5 and the next is 3.8.9 - no 3.7!

The page from which version selected will take you to a list of reference manual topics, where gtkmenu is in the 4th group (IV. GTK+ Widgets and Object) under the topic "Menus, Combo Box, Toolbar". I did not check out every version to ensure they are similar, but I hope this helps. I am not familiar with what you are trying to do, so I cannot provide any further help.

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.