Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
4.8.7, 5.9.0
-
None
-
libxcb 1.11 / xorg-x11-7.6 (opensuse leap 42.3)
Description
While investigating another bug I used Qt::CrossCursor to determine the correct cursor position. But everytime I got a +1pixel offset (x and y) and could not explain where it should come from. In the end I decided to use an own 1x1 cursor:
QPixmap pm(1,1); pm.fill(Qt::red); QCursor redCursor(pm, 0, 0);
Now all positions were as expected.
Attached a testcase to show the problem. It changes the cursor every 500ms from my own to the cross cursor and back. Placing the cursor at e.g. the QTreeWidgetItem frame you will see that the cross cursor has a one pixel offset. I would expect that the cross cursor center is the hotspot of the cursor.
Since this also happens in Qt4 it's maybe a xcb problem but I'm unsure where to look further.