///////////////////////////////////////////////////////
| 117 | |
| 118 | //////////////////////////////////////////////////////////// |
| 119 | Vector2i getMousePosition() |
| 120 | { |
| 121 | // Open a connection with the X server |
| 122 | const auto display = openDisplay(); |
| 123 | |
| 124 | // we don't care about these but they are required |
| 125 | ::Window root = 0; |
| 126 | ::Window child = 0; |
| 127 | int x = 0; |
| 128 | int y = 0; |
| 129 | unsigned int buttons = 0; |
| 130 | |
| 131 | int gx = 0; |
| 132 | int gy = 0; |
| 133 | XQueryPointer(display.get(), DefaultRootWindow(display.get()), &root, &child, &gx, &gy, &x, &y, &buttons); |
| 134 | |
| 135 | return {gx, gy}; |
| 136 | } |
| 137 | |
| 138 | |
| 139 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected