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_hide_on_close();
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(){
SetupCodeEditor();
m_Editor.show();
}
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).