gtk-rs / gtk

DEPRECATED, use https://github.com/gtk-rs/gtk3-rs repository instead!
https://gtk-rs.org/
MIT License
1.24k stars 82 forks source link

Repeatedly running dialogs causes window rendering issues. #952

Closed sprang closed 4 years ago

sprang commented 4 years ago

First noticed this in my app, Marmoset (https://github.com/sprang/marmoset), but it's reproducible in the "menu_bar" example application:

1) Launch "menu_bar" example 2) Choose File > About 3) Close the About dialog 4) Resize the main window 5) Choose File > About

Expected normal window behavior. Actual: Main window flashes back to previous size and is otherwise visually glitchy.

Reproducible with AboutDialog and MessageDialog in Marmoset (where the contents of the window also draw incorrectly).

Running on Arch Linux with latest Rust and Gtk-rs.

sdroege commented 4 years ago

I don't know why this happens but this is going to be a bug in GTK. Please report it here: https://gitlab.gnome.org/GNOME/gtk/issues/new

On our side this can be worked around by not running a recursive main loop (i.e. not calling p.run() in this case). That's a better idea anyway because recursive main loops have interesting reentrancy problems.

I'll submit a PR for changing all the examples in a few minutes.

sdroege commented 4 years ago

@GuillaumeGomez Can you close this one? The main bug here is somewhere in GTK

GuillaumeGomez commented 4 years ago

Sure!

sprang commented 4 years ago

Reported here: https://gitlab.gnome.org/GNOME/gtk/issues/2416