x11/skia: Add setMousePosition() impl

This commit is contained in:
David Capello 2018-08-08 18:58:10 -03:00
parent 26eb34d094
commit 27c8cda988

View File

@ -276,6 +276,13 @@ void X11Window::releaseMouse()
void X11Window::setMousePosition(const gfx::Point& position)
{
Window root;
int x, y;
unsigned int w, h, border, depth;
XGetGeometry(m_display, m_window, &root,
&x, &y, &w, &h, &border, &depth);
XWarpPointer(m_display, m_window, m_window, 0, 0, w, h,
position.x*m_scale, position.y*m_scale);
}
void X11Window::updateWindow(const gfx::Rect& unscaledBounds)