From 753cba1a750ae50d39313201ffa29bd14f7bcf71 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Tue, 19 Apr 2011 05:17:45 +0000 Subject: [PATCH] fix conversion of gdk_input_add() to g_io_add_watch() from r67326 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/utilsgtk.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index 74525871e4..e8d6cf9b44 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -203,8 +203,11 @@ static gboolean EndProcessDetector(GIOChannel* source, GIOCondition, void* data) int wxGUIAppTraits::AddProcessCallback(wxEndProcessData *proc_data, int fd) { - return g_io_add_watch( - g_io_channel_unix_new(fd), G_IO_IN, EndProcessDetector, proc_data); + GIOChannel* channel = g_io_channel_unix_new(fd); + GIOCondition cond = GIOCondition(G_IO_IN | G_IO_HUP | G_IO_ERR); + unsigned id = g_io_add_watch(channel, cond, EndProcessDetector, proc_data); + g_io_channel_unref(channel); + return int(id); } -- 2.45.2