I have a Delphi 11 project that extensively uses AllocateHwnd to communicate between the main thread and background threads (using SendMessage/SendMEssageTimeout/PostMessage). This is very convenient, but now I want to also make this work on Linux with Freepascal.
I was able to make it compile more or less, but AllocateHwnd and SendMessage, as it turned out, don't seem to work on Linux. If I use GTK2 it throws an error ("Widget is nil") and on GTK3 there's no error but it doesn't work. AllocateHwnd always returns zero on Linux. Did I miss something? Or maybe there's a more appropriate alternative (note TThread Synchronize/Queue I'd like to avoid)? The project does not require a GUI at all.