SUGGESTED FIX
Also here attaching Michal's comment about the nature of possible fix:
I've succeeded today to create a patch for the gtk l&f that fixes the problem.
The fix is just 2 lines of code and adds proper gtk locking to the l&f
and so makes the l&f thread safe:
public class MyGTKNativeEngine extends GTKNativeEngine {
@Override
public void startPainting(Graphics g, int x, int y, int w, int h,
Object... args) {
Gtk.gtk.gdk_threads_enter();
super.startPainting(g, x, y, w, h, args);
}
@Override
public void finishPainting() {
super.finishPainting();
Gtk.gtk.gdk_threads_leave();
}
}
Now you should decide if this is an acceptable solution for the problem,
or I should work on the another option.
|