highgui: g_thread_create deprecated warning
authorAlexander Alekhin <alexander.alekhin@intel.com>
Fri, 25 Nov 2016 13:16:25 +0000 (16:16 +0300)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Sat, 26 Nov 2016 15:12:04 +0000 (18:12 +0300)
modules/highgui/src/window_gtk.cpp

index bb69224..cfdf3e8 100644 (file)
@@ -480,9 +480,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;