Needs inexplicable special gtk/gdk magic code for some reason.
(Learned this by hard won experience on Word War vi.)
Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
UNAME := $(shell uname)
GTKCFLAGS = `pkg-config gtk+-2.0 --cflags`
UNAME := $(shell uname)
GTKCFLAGS = `pkg-config gtk+-2.0 --cflags`
-GTKLDFLAGS = `pkg-config gtk+-2.0 --libs`
+GTKLDFLAGS = `pkg-config gtk+-2.0 gthread-2.0 --libs`
SOURCE := gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \
eta.c verify.c memory.c io_u.c parse.c mutex.c options.c \
SOURCE := gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \
eta.c verify.c memory.c io_u.c parse.c mutex.c options.c \
static void init_ui(int *argc, char **argv[], struct gui *ui)
{
static void init_ui(int *argc, char **argv[], struct gui *ui)
{
+ /* Magical g*thread incantation, you just need this thread stuff.
+ * Without it, the label update that happens in gfio_update_thread_status
+ * doesn't really happen in a timely fashion, you need expose events
+ */
+ if (!g_thread_supported ())
+ g_thread_init(NULL);
+ gdk_threads_init();
+
gtk_init(argc, argv);
ui->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_init(argc, argv);
ui->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
init_ui(&argc, &argv, &ui);
init_ui(&argc, &argv, &ui);