diff options
author | Robin Gareus <robin@gareus.org> | 2016-07-25 14:13:52 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-07-25 14:13:52 +0200 |
commit | 3953879d4d423e3d7f79b1913b4ff6fe502c6542 (patch) | |
tree | b275c3bcc8e3b763c0776eb66c8879d43313eda0 /libs/gtkmm2ext/gtkmm2ext | |
parent | 42b20f15a2e5d751582f4c467ffcbcbc9b71a59c (diff) |
add a timeout to flush_pending()
In some circumstances UI::flush_pending never returns, and all UI
interactive ends up being driven by
while (gtk_events_pending()) { gtk_main_iteration(); }
This has various implications depending on the caller and usually results
in a crash at session-close or exit.
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index b9c80a34e0..dbe1739ffc 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -136,7 +136,7 @@ class LIBGTKMM2EXT_API UI : public AbstractUI<UIRequest> void set_state (Gtk::Widget *w, Gtk::StateType state); void popup_error (const std::string& text); - void flush_pending (); + void flush_pending (float timeout = 0); void toggle_errors (); void show_errors (); void dump_errors (std::ostream&); |