crategus / cl-cffi-gtk

cl-cffi-gtk is a Lisp binding to the GTK+ 3 library.

Home Page:http://www.crategus.com/books/cl-cffi-gtk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running cl-cffi-gtk on macOS

jmercouris opened this issue · comments

Hi, I wanted to add the following notes which may help in the documentation for how to run some widgets on macOS.

macOS generally requires drawing from the main thread. The cl-cffi-gtk within-main-loop macro runs on the GTK thread rather than the main thread. This works most of the time, but for some special widgets like the WebKitGTK+ widget, this will not work.

If you manually invoke gtk-main from the cl-cffi-gtk package you can control on which thread things happen (instead of using within-main-loop) you can then force all cl-cffi-gtk operations to happen on the main SBCL thread and then rendering happens correctly.