mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
x11/skia: Add setMousePosition() impl
This commit is contained in:
parent
26eb34d094
commit
27c8cda988
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user