]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/utilsgtk.cpp
Activate cells from keyboard too in generic wxDataViewCtrl.
[wxWidgets.git] / src / gtk / utilsgtk.cpp
index 74525871e4005c0a238cfeb9c18e173b718de37f..fee8aa86a2c21ab7e6d3ab2d738df0274d34d157 100644 (file)
@@ -90,7 +90,7 @@ void wxDisplaySizeMM( int *width, int *height )
 
 void wxGetMousePosition( int* x, int* y )
 {
-    gdk_window_get_pointer( NULL, x, y, NULL );
+    gdk_window_get_pointer(gtk_widget_get_root_window(wxGetRootWindow()), x, y, NULL);
 }
 
 bool wxColourDisplay()
@@ -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);
 }