with Tim Bader on April 25, 2017. I don't know if you have seen that. My first try was just to get the GdkWindow of the spin button but that gave me the main window. No help there. Noticed that the cursor changed with the mouse movement so I went with that. Probably even more hackish than your solution.
gcc -Wall click1.c -o click1 `pkg-config --cflags --libs gtk+-3.0`
Tested with Ubuntu16.04 and GTK3.18
no, I did not see that... it would have saved me some reverse
> My first try was just to get the GdkWindow of the spin button
> but that gave me the main window. No help there.
Yes, that was my second attempt too. My first one was to check for
the presence of the spin callback. I was using
g_main_context_find_source_by_user_data() with the instance as
user_data but I soon discovered the argument of that callback is
wrapped by gdk_threads_add_timeout()  , so I gave up.