diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-07-23 01:15:13 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-07-23 01:15:13 +0200 |
| commit | c278eac390bd37c5ca8b319ed15605211822c08f (patch) | |
| tree | 495ed4a1514a590574c54ce3f2cc890da6fdfdb2 /src/gui_gtk.cc | |
| parent | a3da855cddff3c3c71311af6ce3e7629a459024d (diff) | |
Fix GUI loopers
GTK: If modify() was called more than once inside callback it would
leak watches
QT: Printed warnings as QSocketNotifier was still enabled when socket
was closed
Diffstat (limited to 'src/gui_gtk.cc')
| -rw-r--r-- | src/gui_gtk.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui_gtk.cc b/src/gui_gtk.cc index 4c1cc13..be9fa96 100644 --- a/src/gui_gtk.cc +++ b/src/gui_gtk.cc @@ -1470,7 +1470,11 @@ public: } auto& handle = it->second; if (handle->in_callback_) { - handle->delayed_remove_ = true; + if (handle->delayed_remove_) { + g_source_remove(handle->watch_); + } else { + handle->delayed_remove_ = true; + } } else { g_source_remove(handle->watch_); } |
