From 3f37e34e76a1031e075f6c8a1703a9085feda50e Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 25 Nov 2016 16:16:25 +0300 Subject: [PATCH] highgui: g_thread_create deprecated warning --- modules/highgui/src/window_gtk.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/highgui/src/window_gtk.cpp b/modules/highgui/src/window_gtk.cpp index 8ead11d..6e4da8b 100644 --- a/modules/highgui/src/window_gtk.cpp +++ b/modules/highgui/src/window_gtk.cpp @@ -619,9 +619,13 @@ CV_IMPL int cvStartWindowThread(){ // conditional that indicates a key has been pressed cond_have_key = g_cond_new(); +#if !GLIB_CHECK_VERSION(2, 32, 0) // this is the window update thread window_thread = g_thread_create((GThreadFunc) icvWindowThreadLoop, NULL, TRUE, NULL); +#else + window_thread = g_thread_new("OpenCV window update", (GThreadFunc)icvWindowThreadLoop, NULL); +#endif } thread_started = window_thread!=NULL; return thread_started; -- 2.7.4