All pastes #827458 Raw Edit

Something

public text v1 · immutable
#827458 ·published 2007-12-21 20:04 UTC
rendered paste body
QPoint QCursor::pos()
{
    Window root;
    Window child;
    int root_x, root_y, win_x, win_y;
    uint buttons;
    Display* dpy = QPaintDevice::x11AppDisplay();
    for ( int i = 0; i < ScreenCount( dpy ); i++ ) {
·       if ( XQueryPointer( dpy, QPaintDevice::x11AppRootWindow( i ), &root, &child,
·       ·       ·           &root_x, &root_y, &win_x, &win_y, &buttons ) )

·           return QPoint( root_x, root_y );
    }
    return QPoint();
}