Sign up

GtkD not displaying menus properly

I am experimenting with the GtkD UI library (Gtk for the D language) and have created a simple window with a
menu. The code for the menu is below:

class TopView : Box
{
   MainMenu theBar;

    this()
    {
        super(Orientation.VERTICAL,10);
        theBar = new MainMenu();
    
        packStart(theBar,false,false,0);
   }
}

class MainMenu : MenuBar
{
    private MenuItem fileItem;
    private FileMenu fileMenu;

    this()
    {
        super();

        fileItem = new MenuItem("File");
        fileMenu = new FileMenu();

        fileItem.setSubmenu(fileMenu);
        append(fileItem);
    }
}

class FileMenu : Menu
{
    private MenuItem exitItem;

    this()
    {
        super();

        exitItem = new MenuItem("Exit");
        exitItem.addOnActivate(&closeApp);
        append(exitItem);
    }

    private void closeApp(MenuItem anItem)
    {
        Main.quit();
    }
}

The window is displayed without problems and the menubar appears with the "File" item, but when I click on the "File" item, the menu
with "Exit" does not appear under it. Regardless of where the main window is positioned, the menu with Exit appears at screen position 0,0!

In other words, the menu appears at the top left corner of my computer screen whenever I click on "File".

Have I found a bug in the Gtk implementation? I am using Version 3.9.0 of the GtkD library, and Version 3.24.8 of the Gtk runtime. Or am
I missing something in my code? How do I get the menu to display correctly?

Re: GtkD not displaying menus properly

I know the cause of the menu problem, but not the solution.

The menus display incorrectly when the D application is run on Windows. Apparently, menus display properly when the application is compiled and run on a Linux system (I used CentOS 7 to test the application). On Windows, however, the same code displays the menu at the top left corner of the screen (position 0, 0).

This is definitely a bug that manifests in the Windows version of the library. I am uncertain whether it is in GtkD or in the Gtk runtime itself.

This bug needs to be reported, but I cannot find a place to create a ticket. Can someone tell me if there is a place to report this bug, and if so where that place is?