calling gdk_threads_init() seems to cause the APP freeze when dragging window title bar
Steps to reproduce
- write code as below
- compile & run
- drag the window title bar
Current behavior
the app comes to freeze as long as dragging the window title bar, but everything gonna be ok when removing the calling line gdk_threads_init()
.
Environment
- OS: windows7
- Compiler: mingw GNU-x86-64 (msys2)
- IDE: CodeBlocks 20.03
- GTK+: 3.24.8
All code snippets
int main(int argc, char* argv[])
{
if(!g_thread_supported()) g_thread_init(NULL);
//cause app to freeze?
gdk_threads_init();
GtkWidget *window;
gtk_init(&argc,&argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), "thread debug");
gtk_widget_set_size_request (window,300,300);
gtk_widget_show_all(window);
gtk_main();
return FALSE;
}
Expected outcome
work normally as expected
Snapshot
Edited by phpmooc