Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTk implementation gives us: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. #38

Closed
mlabbe opened this issue Nov 12, 2017 · 2 comments

Comments

@mlabbe
Copy link
Owner

mlabbe commented Nov 12, 2017

Passing this spam on is annoying, and we should look for a way to stop it.

@mlabbe
Copy link
Owner Author

mlabbe commented Dec 31, 2018

There doesn't appear to be a side effect-free way of dealing with this. The solutions investigated:

  1. suppress stderr by closing it with freopen("/dev/null", "w", stderr); prior to the call and re-opening it. This could harm logging elsewhere in the process.

  2. call gtk_native_dialog_set_modal(). This changes the behavior of dialogs on the platform and could harm the userbase.

  3. Create an invisible main window and call gtk_native_dialog_set_transient_for(). There is no good way to persist this invisible window and window managers would do weird things with it anyway.

None of these options are worth getting rid of a stderr message. If this bothers you, use the Zenity implementation or live with the error message, or suppress it yourself as described in option 1. It is not the place of a library to run hacks like this that have process-wide effects.

@mlabbe mlabbe closed this as completed Dec 31, 2018
@mlabbe mlabbe added the wontfix label Dec 31, 2018
@Jochen0x90h
Copy link

The main effect of a dialog being transient for a parent window is that the dialog stays in top of the parent window. Is there a way to provide a native window handle to the nativefiledialog library? For GLFW for example this can be obtained with glfwGetX11Window(). Internally gtk_window_set_transient_for() can be called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants