Bad coordinates and drawing when GooCanvas is in ScrolledWindow with overlay_scrolling=FALSE
@ekalin
Submitted by Eduardo Kalinowski Link to original bug (#793808)
Description
Created attachment 368894 Program displaying the bug
I've noticed a strange behavior when a GooCanvas is in a ScrolledWindow that has overlay_scrolling set to FALSE and the horizontal scroll bar is being displayed.
I've attached a simple example that allows me to reproduce the bug. It displays a canvas with a grid, and clicking anywhere moves the circle so that it is centered on the clicked point.
If overlay_scrolling is TRUE or the window is wide enough, it works as expected.
But when overlay_scrolling is FALSE, the horizontal scroll bar is being displayed, the canvas has been scrolled vertically so that the bottom most part of the canvas is being displayed, a strange behavior happens.
When I click the position the circle, the first effect is that it is not displayed entirely: the top of the moved circle is cut, and the top of the old circle is still displayed. Scrolling (or doing something that causes a redraw) fixes that problem and the circle is displayed again.
But the biggest problem is that the circle is moved to the wrong position. Its center is some pixels above the position of the click. The y coordinate received in the button press event are indeed off by some pixels.
Attachment 368894, "Program displaying the bug":
test.c
Version: 2.0.x