I wonder if there is any quick way to make handleWindowMessage/Expose faster? Like it is now, it seems to repaint everything, which is not allways necessary.
When switching between several virtual screens, which is common in X, it is nice if it the windows redraw as fast as possible.
I have tried to make some hacks to speed up, though, but I don’t understand the code enough to make anything reliable.
I haven’t tried the simplest approach though, allocating one large XImage per window, and just blit to that one. But I was hoping to avoid that, although even that approach could be better than now. I think at least it should be an option unless other and better solutions are possible.