summaryrefslogtreecommitdiff
path: root/src/gui_gtk.cc
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-07-23 01:15:13 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-07-23 01:15:13 +0200
commitc278eac390bd37c5ca8b319ed15605211822c08f (patch)
tree495ed4a1514a590574c54ce3f2cc890da6fdfdb2 /src/gui_gtk.cc
parenta3da855cddff3c3c71311af6ce3e7629a459024d (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.cc6
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_);
}