> When running XBoard in a tiling window manager, e.g. i3, you also can > get windows that are larger than the board and show artefacts on the side. > Can we keep track, if the outside of the board has been drawn on > and add a redraw for that?
That is nasty. Do we really want the user to be able to drag pieces around outside the board? My first thought would be to never draw anything outside the board at all. Then we would also not have to erase it. I guess the pre-Cairo code relied on the drawable to never be bigger than the board, so that the drawing process itself would clip. The generic popup uses a buffer bitmap (from which it satisfies expose events transparently to the user code) that automatically adapts to the widget size (in the sizing event handler), however. I am not sure why we get this effect. The dragging code is pretty complex: it stores a square-sized area of the original board image centered around the dragged piece in a buffer, makes a copy of that undamaged background in a temporary bitmap, draws the piece in that, and then copies this temporary to the board. If it is drawn in a new place, it also has to restore the area outside the overlap of old and new area from the buffered background. And the most complex part is that it then has to get a new undamaged background in the buffer, which for the overlapping part comes from the old buffer, and for the rest must be taken from the newly covered area on the board. (Doing it differently causes a flicker that makes the piece seem partly transparent. In particular, it is important that there is adirect transition between the parts of a black piece that cover each other in the old and new position; drawing a background there as an intermediate, even transiently, is easily seen against the black.) The effect must be caused by some inconsistency in this process, where things are clipped in a different way between saving of the background and restoring it. _______________________________________________ Bug-XBoard mailing list Bug-XBoard@gnu.org https://lists.gnu.org/mailman/listinfo/bug-xboard