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

Repeatedly running dialogs causes window rendering issues. #952

Closed
sprang opened this issue Feb 6, 2020 · 4 comments
Closed

Repeatedly running dialogs causes window rendering issues. #952

sprang opened this issue Feb 6, 2020 · 4 comments

Comments

@sprang
Copy link

@sprang sprang commented Feb 6, 2020

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

This comment has been minimized.

Copy link
Member

@sdroege sdroege commented Feb 6, 2020

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 added a commit to sdroege/gtk-rs-examples that referenced this issue Feb 6, 2020
Recursive main loops can cause interesting reentrancy issues with e.g.
mutexes or refcells and are generally not a good idea.

See also gtk-rs/gtk#952.
@sdroege

This comment has been minimized.

Copy link
Member

@sdroege sdroege commented Feb 6, 2020

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

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Feb 6, 2020

Sure!

@sprang

This comment has been minimized.

Copy link
Author

@sprang sprang commented Feb 6, 2020

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.