Take cursor surface offset into account
From the spec On surface.attach requests to the pointer surface, hotspot_x and hotspot_y are decremented by the x and y parameters passed to the request. Attach must be confirmed by wl_surface.commit as usual. In practice, I don't think it matters that much as most toolkits use wl_pointer.set_cursor to change the hotspot.
This commit is contained in:
parent
1541e35362
commit
37aef0c015
1 changed files with 1 additions and 0 deletions
|
@ -124,6 +124,7 @@ KWaylandServer::SurfaceInterface *SurfaceCursorSource::surface() const
|
||||||
void SurfaceCursorSource::refresh()
|
void SurfaceCursorSource::refresh()
|
||||||
{
|
{
|
||||||
m_size = m_surface->size();
|
m_size = m_surface->size();
|
||||||
|
m_hotspot -= m_surface->offset();
|
||||||
Q_EMIT changed();
|
Q_EMIT changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue