[GTK4]the modal have to be trigger from false to true again,when I reuse the Dialog/Window’s modal

I want to reuse the dialog instance.
But when I reuse the Dialog/Window’s modal, the modal have to be trigger from false to true again?
such as:

    Gtk::Dialog m_Editor;
    void SetupDialog(){
        m_Editor.set_modal(false);//  set to false first
        m_Editor.set_transient_for(*this);// this points to application window
        m_Editor.set_modal(true);// trigger to true

    void ReopenDialog(){

If it doesn’t deal with that, after hiding and then showing the window, the dialog window will be stuck and have no response to the mouse (window can’t be dragged and moved).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.