Skip to content

Commit 7e38a2f

Browse files
committed
Merge pull request opencv#7739 from alalek:fix_gtk_deprecated_2.4
2 parents ac118ae + 90da593 commit 7e38a2f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/highgui/src/window_gtk.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,13 @@ CV_IMPL int cvStartWindowThread(){
480480
// conditional that indicates a key has been pressed
481481
cond_have_key = g_cond_new();
482482

483+
#if !GLIB_CHECK_VERSION(2, 32, 0)
483484
// this is the window update thread
484485
window_thread = g_thread_create((GThreadFunc) icvWindowThreadLoop,
485486
NULL, TRUE, NULL);
487+
#else
488+
window_thread = g_thread_new("OpenCV window update", (GThreadFunc)icvWindowThreadLoop, NULL);
489+
#endif
486490
}
487491
thread_started = window_thread!=NULL;
488492
return thread_started;

0 commit comments

Comments
 (0)